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