1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html lang="en">
3 <head>
4 <title>CSS Test: Placement of out-of-flow object in elements that have been collapsed through</title>
5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/043.html" type="text/html">
7 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">
8 <style type="text/css">
9 .outer { border-top: solid white; border-bottom: solid 1em red; background: green; }
10 .top { height: 1em; background: white; }
11 .float { height: 1em; float: left; background: white; width: 100%; }
12 .bottom { margin-bottom: 1em; }
13 </style>
14 </head>
15 <body>
16 <p>There should be a single green band below, and no red anywhere.</p>
17 <div class="outer">
18 <div class="top"> <!-- 1em vertical white space --> </div>
19 <div class="bottom"> <!-- 1em bottom margin collapses to here -->
20 <div class="bottom"> <!-- 1em bottom margin collapses with above -->
21 <div class="float"> </div> <!-- overlaps the bottom border -->
22 </div> <!-- nothing here, bottom margin collapsed upwards -->
23 </div> <!-- nothing here, bottom margin collapsed upwards -->
24 </div> <!-- 1em bottom red border, coincident with white float above -->
25
26
27
28 </body>
29 </html><!-- note. this test assumes that we accept the following proposed changes:
30 http://lists.w3.org/Archives/Member/w3c-css-wg/2003AprJun/0347.html
31 -->