So…I’m confused by the wording here:
“Relative units, such as em or rem, are relative to another length value. For example, em is based on the size of an elements font. If you use it to set the font-size property itself, it’s relative to the parents font-size.”
What exactly am I reading? What does this mean? I’m hoping someone can clarify.
px are absolute. They don’t depend on the parent font size.
10px no matter the size of the font. Something like
em is relative to the parent font size. Whatever your parent font is,
1em is the width of the letter
m. and 2em would be twice the width of an
m in the parent font size. It’s size will change if the size of the parent font changes.
ok so this is something I have recently just fallen in love with
Watch this video:
now I must be honest and say the one thing I don’t like about it is that it still bases the root as pixels.
watch the video and then try this:
then base your rems and ems of that, see how it responds. 1.5 is not set in stone you can go up or down. You can also bump it up through a media query.