3 ms·
Actually I never realized this but aren't em and % actually the same then? 0.8em = 80%
by nerfhammer 9y ago
Actually I never realized this but aren't em and % actually the same then? 0.8em = 80%
- musage 9y agoThere is one caveat relating to default browser font size, but yes: https://kyleschaeffer.com/user-experience/css-font-size-em-vs-px-vs-pt-vs/ https://kyleschaeffer.com/user-experience/css-font-size-em-v...
- n-gauge 9y agoUnfortunately issues arise when using em's in Android webview compared to Chrome. Em's get rendered about 8x in webview, even though the Chrome emulator shows otherwise. I tried the % way but that doesn't fix it either.
- YSFEJ4SWJUVU6 9y agoIn font sizes yes, other sizes not so much :-) (I couldn't reproduce the issue highlighted in musage's source by altering Firefox' default font size, but perhaps that's an IE only thing.)
- abritinthebay 9y agoIn this case yes. But you can use em as a unit anywhere. Set your div elements to 20em width if you like. Now you have a layout that scales with your text!