multicol-margin-002.xht (2047B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 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.xht" /> 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 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"><![CDATA[ 13 div#test-multi-column-red 14 { 15 background-color: red; 16 color: white; 17 font: 3.125em/1 Ahem; /* equivalent to 50px/50px Ahem */ 18 height: 4em; 19 margin-top: 0em; 20 width: 4em; 21 22 column-count: 2; 23 column-fill: balance; 24 column-gap: 0em; 25 } 26 27 span 28 { 29 display: inline-block; 30 margin-top: 2em; 31 } 32 33 div#reference-overlapping-green 34 { 35 background-color: green; 36 bottom: 200px; 37 height: 100px; 38 position: relative; 39 width: 100px; 40 } 41 ]]></style> 42 43 </head> 44 45 <body> 46 47 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 48 49 <div id="test-multi-column-red"> 50 <span>ab cd</span> 51 ef gh ij kl 52 </div> 53 54 <div id="reference-overlapping-green"></div> 55 56 <!-- 57 58 Expected result (before the overlapping): 59 60 ********************* 61 | margin- | ef | 62 | top red | | 63 | back | gh | 64 | ground | | 65 ********************* 66 | ab | ij | 67 | | | 68 | cd | kl | 69 | | | 70 ********************* 71 72 --> 73 74 </body> 75 </html>