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/045.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 .c { margin: 0; background: red; }
15 .d { margin: 0; background: red; }
16 .e { margin: 0; background: purple; height: 1em; float: left; width: 100%; }
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="c"> </div>
33 <div class="d">
34 <div class="e"> </div>
35 </div>
36 <div class="f"> </div>
37 </div>
38 </td>
39 <td class="control">
40 <div class="aqua"></div>
41 <div class="fuchsia"></div>
42 <div class="purple"></div>
43 </td>
44 </tr>
45 </table>
46
47
48
49 </body>
50 </html><!-- note. this test assumes that we accept the following proposed changes:
51 http://lists.w3.org/Archives/Member/w3c-css-wg/2003AprJun/0347.html
52 -->