@mattstuddert
Posted
As far as px
vs em
I'd actually recommend looking into using rem
units. They look directly at the html
font-size
and so are much easier to use than em
units, but much more flexible/maintainable than pixels.
@DanielGibsonOrchid
Posted
Thanks Matt. This website is very helpful. Thanks for the advice on using rem.
What do you think about padding/margins, best to use percentage?
What about declaring the size of a section, best to use width/height on the <section> tag or let the content fill the section and adjust the size with padding/margins?
@mattstuddert
Posted
I would also recommend rem
for padding/margins, as then spacings scale down with the text size as it changes for different screen sizes.
I very rarely set height
on an element. It's usually much better to just add padding-top
and padding-bottom
and then let its height be dictated by the content inside.