Although you can read elsewhere, there is a direct no relationship between em and px.
As stated in one of the links:
the value of "em" in the width of the capital letter M
So for each font this will be different. A narrow font can have the same height (in px) as an extended font, but the size of the em will be different.
EDIT three years later:
Now there are many sources that say 1em = font size (in px). That is, when you write font-size:16px , then 1em = 16px. This is still inconsistent with the Adobe source (which states 1em = font size in pt ), but it seems weird anyway; em would be too large with condensed fonts and too small with extended fonts.
I am going to make some test pages and see for myself.
As well as:
I see that no one (including me) answered the question (which was hidden):
I also read somewhere about some ie error and about overcoming this body font size for something
According to this page , you need to add this to your css: html{ font-size:100%; } html{ font-size:100%; } . There are six years on this page, and I have not read (hundreds) of comments, so I do not know how relevant this is.
egrunin Dec 17 '10 at 19:49 2010-12-17 19:49
source share