+ 1
Em or rem?
What is the difference between Em and Rem & which is the best choice?
3 odpowiedzi
+ 2
<div style="font-size:1.5em">
Some
<div style="font-size:1.5em">
Text
</div>
</div>
try it, and then change to rem
+ 2
When using em units, the pixel value you end up with is a multiplication of the font size on the element being styled.
When using rem units, the pixel size they translate to depends on the font size of the root element of the page, i.e. the HTML element. That root font size is multiplied by whatever number you’re using with your rem unit.
0
Hi