More about em

There where a few posts on the WSG (Web Stand­ards Group) mail­ing list about ems and I received some feed­back regard­ing the About em com­ment­ary, which other than remind­ing me that 16 pixels has been the default font size in all mod­ern browsers since 2000. I was poin­ted at the W3C specs on em-width and font size for CSS1 and CSS2 spe­cific­a­tions. Both spe­cific­a­tions state em is a unit of length, taken from the com­puted font size of the cur­rent element.

So I went out and exper­i­mented in all mod­ern browsers I could lay my hands on Fire­fox 1.07, Cam­ino 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 mat­ter what font is used, from Fru­ti­ger 95 Black to Gill Sans MT Con­densed, 1em is related to the height of the font not the width of an upper­case M.

The big sur­prise was not Nets­cape 4 giv­ing dif­fer­ent res­ults 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 exper­i­ment page.

Comments are closed.

Affiliates

Google
text advertising by
Powered by Reseller Zoom