random1 Posted January 19, 2010 Share Posted January 19, 2010 Hey All, I'm trying to set up a consistant rule for my stylehseet's sizing. For all measurements I wish to use em instead of px or %. Is this a good idea? Any drawbacks for doing this? Do all browsers accept em as a measurement? E.g. I've set my body selector to: font-size:0.875em; Refferred Source: http://pxtoem.com/ SIZINGS: Pixels EMs Percent Points 6px 0.429em 42.9% 5pt 7px 0.5em 50% 5pt 8px 0.571em 57.1% 6pt 9px 0.643em 64.3% 7pt 10px 0.714em 71.4% 8pt 11px 0.786em 78.6% 8pt 12px 0.857em 85.7% 9pt 13px 0.929em 92.9% 10pt 14px 1em 100% 11pt 15px 1.071em 107.1% 11pt 16px 1.143em 114.3% 12pt 17px 1.214em 121.4% 13pt 18px 1.286em 128.6% 14pt 19px 1.357em 135.7% 14pt 20px 1.429em 142.9% 15pt 21px 1.5em 150% 16pt 22px 1.571em 157.1% 17pt 23px 1.643em 164.3% 17pt 24px 1.714em 171.4% 18pt Link to comment https://forums.phpfreaks.com/topic/188978-css-sizing-throughout-stylesheet/ Share on other sites More sharing options...
TheFilmGod Posted January 19, 2010 Share Posted January 19, 2010 Em is a not a "measurement" it is a relative way of making text and divs interact in a proportional way. Now that's not to say you can't use em just for text, but that isn't the true purpose of the em measurement. Ems are used as a relative measurement. Something that can be successfully used to scale divs and text together. Link to comment https://forums.phpfreaks.com/topic/188978-css-sizing-throughout-stylesheet/#findComment-998291 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.