1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>CSS Multi-column Layout Test: multi-column and margin collapsing of first child (basic)</title>
5 <link rel="author" title="Opera Software ASA" href="http://www.opera.com/">
6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2013-08-10 -->
7 <link rel="help" href="http://www.w3.org/TR/css3-multicol/#pseudo-algorithm" title="3.4 Pseudo-algorithm">
8 <link rel="match" href="reference/ref-filled-green-100px-square.htm">
9 <meta name="flags" content="ahem">
10 <meta name="assert" content="This test checks that the margin-top of the first child (an inline-block) of a multi-column element (with column-fill: balance) does not collapse with its parent.">
11 <style type="text/css">
12 div#test-multi-column-red
13 {
14 background-color: red;
15 color: white;
16 font: 3.125em/1 Ahem; /* equivalent to 50px/50px Ahem */
17 height: 4em;
18 margin-top: 0em;
19 width: 4em;
20
21 column-count: 2;
22 column-fill: balance;
23 column-gap: 0em;
24 }
25
26 span
27 {
28 display: inline-block;
29 margin-top: 2em;
30 }
31
32 div#reference-overlapping-green
33 {
34 background-color: green;
35 bottom: 200px;
36 height: 100px;
37 position: relative;
38 width: 100px;
39 }
40 </style>
41
42 </head>
43
44 <body>
45
46 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
47
48 <div id="test-multi-column-red">
49 <span>ab cd</span>
50 ef gh ij kl
51 </div>
52
53 <div id="reference-overlapping-green"></div>
54
55 <!--
56
57 Expected result (before the overlapping):
58
59 *********************
60 | margin- | ef |
61 | top red | |
62 | back | gh |
63 | ground | |
64 *********************
65 | ab | ij |
66 | | |
67 | cd | kl |
68 | | |
69 *********************
70
71 -->
72
73 </body>
74 </html>