Previous Message
Next Message

Re: [css-d] Divergence between compliant browsers

Sent by Rijk van Geijtenbeek on 30 January 2002 11:11

On Wednesday, January 30, 2002, Andrew wrote:

AC> Erik Rieselbach [EMAIL-REMOVED]> wrote:

>> What I want, obviously, is two boxes with a border around each and 8px of
>> space between them.

AC> top- and bottom- margin collapsing of blocks in parents is very, very odd
AC> in CSS. I've never understood it properly, and I'm not even sure Opera's
AC> behaviour is wrong in this case. But Opera, Mozilla and IE all behave so
AC> differently with regard to margin-collapsing that I try to completely
AC> avoid top/bottom margins except when it's for two blocks of text that
AC> are right next to each other.

AC> I'll have another go at reading the spec later. :-)

The margin shorthand when used with 'auto' values is buggy in Opera. I
tried different combinations, and this worked:

#top {
margin-left: auto;
margin-right: auto;
margin-top: 8px;
#topcontent {
 border-top:2px solid black;
 border-bottom:2px solid black;
 border-left:12px solid black;
 border-right:12px solid black;
#mainframe { width:750px; 
margin-left: auto;
margin-right: auto;
margin-top: 8px;
#mainframecontent { border:2px solid black;}

As soon as I add the margin-bottom declaration, something breaks
dependign on the order of the declarations.

 Rijk                            [EMAIL-REMOVED]

Mot du Jour:
All that glitters has a high refractive index.
Previous Message
Next Message

Message thread:

Possibly related: