Previous Message
Next Message

Re: [css-d] escaping margins?

Sent by Big John on 19 June 2002 22:10


Joe Howley wrote:
> > The other day, I noticed that Mozilla allowed the margins of a p
> > tag that was the first child of a div to escape from the p and
> > affect the div instead. 

--- Scott Sauyet [EMAIL-REMOVED]> wrote:
> Maybe I misunderstand the spec, but it seems to me that this is
> what
> would likely happen from the collapsing vertical margins described
> here: http://www.w3.org/TR/REC-CSS2/box.html#collapsing-margins.
> 
>  "Two or more adjoining vertical margins of block boxes in the
>  normal flow collapse. The resulting margin width is the maximum of
>  the adjoining margin widths."
> 
> The example on the W3C site only points out the collapsing of the
> bottom margin of one block element and the top margin of the
> following
> one, but I would guess that it applies equally to nested boxes. 

The important word here is 'adjoining'. This seems to exclude nested
boxes. I wonder if the <p> margin will 'escape' thru more than one
nested div top edge. (?)

No matter how it's 'supposed' to work, it's still a design headache,
and a useful demo. Thanks Joe!

Note to Joe: try applying different rules (background/padding/margin,
etc.) to the various elements. Could be that something will 'kill'
this bug. Worth a shot. :]
Big John


=====
"What the world needs is a good bug ring"--Big John
<http://users.rraz.net/mc_on_the_rocks/testpage/pie.html>

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Previous Message
Next Message

Message thread: