Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Responsive Web Design: When to use px vs. % on margins and padding? Re: Responsive Web Design: When to use px vs. % on margins and padding?

#93642
noahgelman
Participant

@mikes02

It can have a fixed width, but a responsive width. For example:

#element {
padding:20px 15%;
}

The height will stay the same but the width will change as you resize the page