Re: Margin collapsing and overflow: hidden

Hi Bruno,

> And about Opera it should be noted that _any_ empty div (even without
> overflow) stops the collapsing between a preceding and a following sibling,
> so Opera doesn't seem too realiable here.

I'm not seeing this in Opera 9, if I change hidden to visible the gap 
between paragraphs gets smaller as the margins collapse.

> With a simpler construction with just two siblings, the addition of
> overflow:hidden doesn't seem to stop the collapsing in any browsers.

Are you sure? Try this test document in Opera 9 and Firefox 1.5:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<p>Hello!</p>
<div style="overflow: hidden"></div>
<p>Hello!</p>
</body>
</html>

There should be a larger than usual gap between the two paragraphs, 
which returns to normal if hidden is changed to visible.

Best regards,

Michael

-- 
Print XML with Prince!
http://www.princexml.com

Received on Monday, 8 October 2007 00:45:40 UTC