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: Margin Collapsing: in flow (simple)</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/006.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 .ahem { display: inline; font: 1em/1 Ahem, sans-serif; background: red; color: white; }
10 table { border-spacing: 0; font: 50px/1 Ahem; border: solid; background: red; }
11 td { padding: 0; }
12 /* test */
13 .test { background: orange; }
14 .test div { margin: 1em 0; background: red; }
15 .test .a { color: yellow; }
16 .test .b { color: lime; }
17 /* control */
18 .control div { width: 1em; }
19 .control .c { border-top: 1em orange solid; }
20 .control .a { border-top: 1em yellow solid; }
21 .control .b { border-top: 1em lime solid; }
22 /* control control */
23 .red { background: red; height: 1em; width: 10em; border: solid; }
24 .orange { border-top: 1em orange solid; }
25 </style>
26 </head>
27 <body>
28 <div class="ahem">Ahem_font_required_for_this_test.</div>
29 <p>The pattern below should be a stack of horizontal bars with no red.</p>
30 <table>
31 <tr>
32 <td class="test">
33 <div class="a">X</div>
34 <div class="b">X</div>
35 </td>
36 <td class="control">
37 <div class="c"></div>
38 <div class="a"></div>
39 <div class="c"></div>
40 <div class="b"></div>
41 <div class="c"></div>
42 </td>
43 </tr>
44 </table>
45 <p>Control: This test is meaningless if you see any red below. (You should only see orange.)</p>
46 <div class="red">
47 <div class="orange"></div>
48 </div>
49
50
51 </body>
52 </html>