multicol-span-all-margin-nested-001.xht (1907B)
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: vertically adjacent spanning elements with nested margins (complex)</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-19 --> 7 <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-span" title="6.1. 'column-span'" /> 8 <link rel="match" href="multicol-span-all-margin-nested-001-ref.xht" /> 9 <meta name="flags" content="ahem" /> 10 <meta name="assert" content="In this test, the first h4 element would collapse its margin bottom with the top margin of div#child if only div#child was also a spanning element, which is not: the bottom margin of the first h4 element is 8em wide while the top margin of div#child is only 2em wide (1 column box wide). That is why the bottom margin of the first h4 element should not collapse with the top margin of div#child." /> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"><![CDATA[ 13 div#multi-column 14 { 15 background-color: yellow; 16 border: gray solid 1em; 17 color: navy; 18 font: 1.25em/1 Ahem; 19 orphans: 1; 20 overflow: hidden; 21 widows: 1; 22 width: 8em; 23 24 column-count: 4; 25 column-gap: 0em; 26 27 /* 28 29 N == 4; 30 31 W == 2em; 32 33 */ 34 } 35 36 h4, div#child 37 { 38 background-color: black; 39 color: black; 40 font: inherit; 41 margin: 0; 42 } 43 44 h4 45 { 46 margin: 1em 0; 47 width: 11em; 48 49 column-span: all; 50 } 51 ]]></style> 52 </head> 53 <body> 54 55 <div id="multi-column"> 56 na vy na vy 57 na vy na vy 58 59 <h4 id="first">black</h4> 60 61 <div id="child"> 62 <h4 id="nested">black</h4> 63 </div> 64 65 na vy na vy 66 na vy na vy 67 </div> 68 69 </body> 70 </html>