Re: Units of measurements

em takes on a different meaning in CSS to the usual typographic term. In Typography, 6em's=1 inch, in CSS an em is the height of the actual font, inluding internal leading, (so the em of a 12 pt nuptial glyph and a 12pt arial gyyph are identical). If the base font of the containing box is a 12 point font then 1em= 1/6th of an inch. 

    Note also that if you set the margin property to 1em it will (should) take the measurement from the font of the containing box, not the box you are creating so:

<DIV STYLE="font-size:12pt">
    <DIV STYLE="margin-left:1em;font-size:36pt">
        The left margin in this element  should be 12pt not 36pt.
On the other hand the ex unit refers not to the width, but the height of the x character (or equivalent in non-ascii glyphs), so the ex unit will (should!!, implementation of this property is spoty at best) be different in a Nuptial and an Arial font.
Hope this clears it up.
-----Original Message-----
    From: John Ky (HxG) <>
    To: STYLE <>
    Date: Monday, April 06, 1998 5:19 AM
    Subject: Units of measurements
    I'm a little concerned about the way the em and
    ex units used in style sheets are implemented
    in IE4.
    I chose to use a monospaced font and specified
    a left margin of 1 em unit and found the margin
    did not match the width of the character 'm'.
    Rather it turned out about 1.5 times larger than
    the 'm' character.  Also, the ex unit turned out
    to be slightly less than the width of the 'x'
    Because of this, I am unable to specify a
    margin that is a multiple of the width of the
    characters in a monospaced font.  Can
    someone explain why this is so?  The
    problem also exists in NN4.

Received on Monday, 6 April 1998 11:44:36 UTC