Previous Message
Next Message

I Have a Really Big 'm'

Sent by Tim Climis on 24 January 2012 22:10


>  From my this, it really visually appears as if the em is not an "m" or an "M" in
> even the most plain typeface. That's when the text is centered. If it's left or
> right aligned, you can fit in two more "m".

As has been discussed before in this thread, em is not a horizontal measure.  It is a vertical
measure, and is defined as the size of the font.

Directly from the CSS 1 spec (just to show that it's always been defined this way - at least in CSS)
"ems, the height of the element's font"  http://www.w3.org/TR/CSS1/#units

The CSS 2.1 spec gets more precise, particularly in regard to x-height.
http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#length-units

It was (a really long time ago, and only a really long time ago *in print*) a measure of the width
of a capital M.  It has been (and is defined in the CSS spec as) the font height for quite a while.

> more interestingly, I looked at the "computed size" in Chrome, and it
> reported that the div had a calculated size of 140px.
> 

That's not interesting at all.  That's expected.  The font-size is 14px (you set it to that).  1 em
is the font-size.  So 10em would be 14px x 10=140px.


______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: