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

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 UTC