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 border)</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/008.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 border.">
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 border-bottom: solid lime 0.04px; }
23 .test .b { margin: 1em 0 0 0; }
24
25 /* control */
26 .control .a { margin: 0 0 2em; }
27 .control .c { border-bottom: solid lime 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="c"></div>
45 <div class="b">B</div>
46 </div>
47 </td>
48 </tr>
49 </table>
50 <p>This test is meaningless if you don't pass <a href="margin-collapse-106">margin-collapse-106</a>.</p>
51
52
53 </body>
54 </html>