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

 > We're implementing a visual editor for CSS.


 > 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.



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 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:44 UTC