W3C home > Mailing lists > Public > www-style@w3.org > July 1997

Re: Confused with length units em,en, & ex in Margin

From: Hakon Lie <howcome@w3.org>
Date: Wed, 23 Jul 1997 00:48:09 +0200 (MET DST)
Message-Id: <199707222248.AAA13110@online.no>
To: neil@bigpic.com
Cc: www-style@w3.org
Neil,

 > We're implementing a visual editor for CSS.

Great!

 > In languages without 'N' and 'M' and 'X' is the value for the 
 > measurements en,em, and ex supposed to be mapped to something 
 > appropriate?  Are there any guidelines that you know of?

As has been discussed on this list, the "em" value is eaqual to the
height of the font, not the width of the "M" glyph. 

CSS1 does not have "en" -- use "0.5em" instead.

"ex" is the only one that can pose problems. Some font formats will
tell you the x-height independent of the "x" glyph (which often is
slightly higher). If you don't get any such value and have no "x"
glyph, I'd suggest making "ex" a fixed fraction of "em" (e.g.
1ex=0.4em).

Regards,

-h&kon

H      k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria # FRANCE http://www.w3.org/people/howcome
Received on Tuesday, 22 July 1997 18:48:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:50 GMT