Previous Message
Next Message

RE: [css-d] Divergence between compliant browsers

Sent by Rieselbach, Erik on 30 January 2002 11:11


I said: "...I've had major problems in the past with positioning,
margins, and font sizes in Opera. I've just downloaded Opera 6 for Windows,
and it seems to be much improved, I confess, though it still does some
strange things with margins. Opera 5 for Mac still has positioning problems
(although to be fair, Mac IE has different but equally persistent problems
with positioning too)."

	and Ben Henick said: "The problem lies not so much in the CSS as in
the HTML, I bet."

I don't think so in my cases. Unfortunately, my sites are all behind a
corporate intranet, so I can't give a working URI. But here's a simple
example that does what I want it to in IE 5 and NS6 on both Mac and Win, but
misbehaves in Opera 5/Mac and 6/Win.

I have nested divs: 

<div id="top"><div id="topcontent"></div></div>
<div id="mainframe"><div id="mainframecontent"></div></div>

with this CSS:

#top { margin:8px auto; width:750px; }#topcontent {
 border-top:2px solid black;
 border-bottom:2px solid black;
 border-left:12px solid black;
 border-right:12px solid black;
 padding:10px;
}#mainframe { width:750px; margin:8px auto; }#mainframecontent { border:2px solid black;}
What I want, obviously, is two boxes with a border around each and 8px of
space between them. I get this in IE and NS. But Opera collapses the space
between the two boxes to nothing and buts them right up against each other.
Curiously, if I remove the #mainframecontent css, #mainframe is positioned
properly.

This is not an unusual layout, and yet Opera seems to get it wrong. (If
anyone can justify this from the spec, by all means let me know.)

Best,

Erik

Erik Rieselbach
Previous Message
Next Message

Message thread:

Possibly related: