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/047.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 td { width: 3em; padding: 0; }
10
11 .test { background: fuchsia; }
12 .a { margin: 0; height: 1em; background: aqua; }
13 .b { margin: 0; background: red; }
14 .e { margin: 0; background: purple; height: 1em; float: left; width: 100%; }
15 .c { margin: 0; background: red; }
16 .d { margin: 0; background: red; }
17 .f { margin: 0 0 1em 0; background: red; }
18
19 .control { background: red; }
20 .aqua { border-top: solid 1em aqua; }
21 .fuchsia { border-top: solid 1em fuchsia; }
22 .purple { border-top: solid 1em purple; }
23 </style>
24 </head>
25 <body>
26 <p>The following two columns should look the same.</p>
27 <table>
28 <tr>
29 <td class="test">
30 <div class="a"> </div>
31 <div class="b">
32 <div class="e"> </div>
33 <div class="c"> </div>
34 <div class="d"> </div>
35 <div class="f"> </div>
36 </div>
37 </td>
38 <td class="control">
39 <div class="aqua"></div>
40 <div class="fuchsia"></div>
41 <div class="purple"></div>
42 </td>
43 </tr>
44 </table>
45
46
47
48 </body>
49 </html><!-- note. this test assumes that we accept the following proposed changes:
50 http://lists.w3.org/Archives/Member/w3c-css-wg/2003AprJun/0347.html
51 -->