Answers for "em vs. rem"

CSS
27

rem vs em

em -> is relative to the font-size of its direct or nearest parent 
rem -> is relative to the html (root) font-size
Posted by: Guest on March-26-2020
4

em vs rem

1EM or 1REM (r = root em)
The difference is inheritance.
The Rem value is based on the root element (html).
What is meant here is the font size for html and not the font size for the documet body.
... Em is based on the font size of each
Parent element.
Posted by: Guest on July-04-2020

Browse Popular Code Answers by Language