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 (used padding)</title>
5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/009.html" type="text/html">
8 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">
9 <meta name="assert" content="This tests that emptiness is based on the computed values of padding.">
10 <style type="text/css">
11 table { border-spacing: 0; font-size: 50px; border: solid white; background: red; }
12 td { padding: 0; }
13
14 /* colors */
15 .test, .control { background: lime; }
16 .a { background: aqua; color: aqua; }
17 .b { background: yellow; color: yellow; }
18
19 /* test */
20 .test .a { margin: 0 0 1em 0; }
21 .test .c { margin: 1em 0 1em 0;
22 padding-bottom: 0.04px; }
23 .test .b { margin: 1em 0 0 0; }
24
25 /* control */
26 .control .a { margin: 0 0 2em; }
27 .control .c { padding-bottom: 0.04px; }
28 </style>
29 </head>
30 <body>
31 <p>The pattern below should be a stack of three perfect rectangles with no red.</p>
32 <table>
33 <tr>
34 <td>
35 <div class="test">
36 <div class="a">A</div>
37 <div class="c"></div>
38 <div class="b">B</div>
39 </div>
40 </td>
41 <td>
42 <div class="control">
43 <div class="a">A</div>
44 <div class="b">B</div>
45 </div>
46 </td>
47 </tr>
48 </table>
49 <p>This test is meaningless if you don't pass <a href="margin-collapse-106">margin-collapse-106</a>.</p>
50
51
52 </body>
53 </html>