Re: font sizes in ems

At 05:36 PM 7/18/97 +0200, Hakon Lie wrote:
>In any case, it's an intersting test page. I've modified it slightly
>and put up on [1]. It appears that MSIE4PR2 renders it correctly. NS4
>doesn't infer the P end tags and therefore have problems with the
>third lines.
>[1] http://www.w3.org/Style/CSS/Test/ems.html
>[2] http://www.w3.org/Style/CSS/Test

A very helpful test page -- and thread. Thanks!

I've added a few things to this page that others may find helpful:

Specifically, I've added a new line for each font family, this time using
the px unit. Above this line, I've placed a GIF scaled to match the width
of that px text as closely as possible.

In both large- and small-font monitor settings, using MSIE4PR2, the GIF
stays exactly the same width as the text (a property we find very useful
for fitting headlines beneath logos and inside table cells). Also, with
IE4, this page prints with the same scaling as the screen. (With IE3,
anything measured in px prints in teeny, tiny letters.)

I bring the GIF and px unit in simply because it illustrates how em units
scale according to large font/small font settings, while px units do not.
Both are very useful for different layout demands. 

On another note, here's the only way we came up with to deal with the
inconsistent interpretations of em units in IE3, IE4, NS, etc: Use
client-side browser detection with JavaScript to decide which external CSS
file to reference, and use document.write statements to write out the
<link> tag. Has anyone actually tried this to see if it works?


    Alan Karben
    Manager, Multimedia
    The Wall Street Journal Interactive Edition

    karben@interactive.wsj.com    phone: 609 520 7361
    http://wsj.com                  fax: 609 520 7137