The Box Model
I see how they work but I'm not seeing the advantage over a px value. Why not skip the calculation?
The advantage of em units is the dimensions you set will adapt to the font size. With pixels it will never change.
according to the video there is no absolute value so how does the em and rem value relative to ,steven ?
If I understand your question, rem values are relative to the default font size of the document, and em values are relative to the font size of the parent element.
oh got that , tks u , at first i see no default value , so i don't know which base do rem and em lean on cause every font-size are rem and em
If not explicitly set in the CSS, 1rem will be equal to the default font-size provided by the browser (usually 16px).
Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.
I forgot my password