Margin in Internet Explorer

This HTML/CSS code seems to cause problems to Explorer:

<html>
<head>
[...]
  div.pres { font-family: sans-serif ;
             margin-left: 8% ;
             margin-right: 8% ;
             margin-top: 2em ;                    <<
             margin-bottom: 2em ; }            << Notice those...
  div.subpres { font-family: sans-serif ;
                margin-left: 12% ;
                margin-right: 12% ; }
</head>
<body>
<table cellpadding=0 cellspacing=0>
<tr><td bgcolor=black>Left-top</td><td bgcolor=black>Top</td></tr>     <<
Don't look at that code
<tr><td bgcolor=black>Left</td><td>
<div class="pres">                                << Problem area begins...
[...]
</body>
</html>

Internet Explorer seems to be unable to display the top and bottom margin
correctly when relative values are used, but it works perfectly with 'em'
values.  Notice left and right margins are displayed perfectly.  Have
anybody noticed that and is there a more elegant way to move around this bug
? (or am I a fool ?)

Also with IE, DIV tags doesn't seem to inherit font-family from BODY.  CSS
specs says it should.  I don't see any ways to run around that bug, I just
want to know if somebody noticed that too, or if there is a doc on the web
that tells how Netscape and IE mess up CSS.

Neumann/Maus
François-Denis Gonthier
claudeg@icrdl.net
http://www.icrdl.net/claudeg        (The page I'm talking about isn't there)

Received on Thursday, 19 March 1998 02:30:45 UTC