David Hucklesby wrote:

> Indeed that works. But I'm as confused as Jerod here - I don't see 
> evidence of margins on anything here.  The only element that's likely
>  to have a margin is the UL, and Jerod has expressly set that to
> zero. And poking around with Firebug, I can't see what is
> overflowing.
> 
> So "Collapsing Margin Bug" does not seem to be an explanation.

The margins in question are on #headerText h2 and #headerText h3. Remove
the top and bottom margins on those two elements, and the need to
contain collapsing margins in #header is gone.

The confusion comes from the fact that the vertical margins that are
collapsing, creates a gap at the same place regardless of whether they
are top or bottom margins.

Since margins in themselves are invisible there's no way I can prove
which element the top vs. the bottom margins get attached to for the
case at hand. However, the top of #header and the bottom of #toolbar
meet where the gap appears, so both these elements probably get an extra
margin out of the "collapsing margin" process. This gap won't become
larger than the largest vertical margin that ends up there - 10px.

Comment out #headerText h2{margin-bottom:10px;} and there will only be a
5px gap, since the other vertical margins that are involved are all 5px
tall. The gap will stay at 5px until all vertical margins on h2/h3 are gone.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to