Bryan Thien6,678 Points
Rem or Em
Why does he use rem for max-width but the rest he uses em. Is there a good rule of thumb when to use each one?
I didn't complete the 'Web Typography' course but Guil touches this subject on CSS basics.
The idea is simple:
When you want different font sizes for elements inside a parent element and the parent has a different font size, go with rem because if you use em units then a compounding effect will happen because em units being the relative units they are, are relative to their parent element's font size. If you want to avoid this affect then use rem's
You will use rem's when you want the font size to be relative to the root of the document. and em's when you want the font-size to be relative to the parent element of the child. that's while assuming you changed the font size of the parent element.