How many pixels in IE8 is 1?

Isn't it supposed that all browsers should have 16 pixels?

I have this CSS

* {font-size: 1em; } label { font-size: .85em; } 

which on IE8 weirdly gives shortcut elements 12px height versus the 13.6px I was hoping for.

Thanks for the help!

+7
source share
2 answers

Isn't it supposed that all browsers should have 16 pixels?

Not necessary:

One 'Em' (1em) is equal to the height of the capital letter "M" in the default font size. When used in CSS, Em represents either the user's default font size or the font size of the parent element, if available.

Thus, although the default font size is 16 pixels, you may have a different size set in IE.

You may also have some kind of obscure parent element that overrides it.

Additional Information

+18
source

The unit em is relative. If you have a 12pt font, 1 em = 12pt. Using fontsize 20pt, 1 em = 20pt. This comes from the letter M. It dates from the time and period when the lyrics were created by the composer. The letter M was the size of the square of the hull.

+3
source

All Articles