More about em

There where a few posts on the WSG (Web Standards Group) mailing list about ems and I received some feedback regarding the About em commentary, which other than reminding me that 16 pixels has been the default font size in all modern browsers since 2000. I was pointed at the W3C specs on em-width and font size for CSS1 and CSS2 specifications. Both specifications state em is a unit of length, taken from the computed font size of the current element.

So I went out and experimented in all modern browsers I could lay my hands on Firefox 1.07, Camino 0.8.1, Opera 8.5, Safari 1.3, IE6, IE 5.23 for the Mac and even IE5 for the PC. As long as they are set at the default font size, 1em = 16 pixels no matter what font is used, from Frutiger 95 Black to Gill Sans MT Condensed, 1em is related to the height of the font not the width of an uppercase M.

The big surprise was not Netscape 4 giving different results but font-family: none; replaces the Safari default font you set with the real default Gill Sans. If you use another browser I did not list and your default font size is 16 pixels can you send me a screen shot of the first five divs on the experiment page.

possibly related posts

Leave a Reply

Note your comments are subject to the whim of Nick Cowie, who reserves the right to delete or edit comments I consider to be spam, defamatory, too long or just obnoxious.

Affiliates

Google
text advertising by
Powered by Reseller Zoom