- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Fri, 13 Sep 2002 19:06:29 -0400
- To: www-style@w3.org
I have a question about margin collapsing and floats. Currently the CSS2.1 specification says: * Vertical margins between a floated box and any other box do not collapse. Is this really the intent? If I have: <div style="float: right; border: 1px solid black"> <div style="margin: 1em">Some text</div> </div> Should the border really be 1em from the text of the inner div (unlike the non-floated case, when it would be next to the text in the inner div)? Consider using a <p> (which has default margins in most browsers) inside a border-less floater that has a margin because you don't want the text flowing around it. In this case one would think margin-collapsing would be desirable, no? It seems that what's really meant here is that floated boxes' margins do not collapse except with descendant boxes... Boris -- The typewriting machine, when played with expression, is no more annoying than the piano when played by a sister or near relation. -- Oscar Wilde
Received on Friday, 13 September 2002 19:06:31 UTC