multicol-span-all-margin-nested-002.xht (1993B)
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 resulting (from a margin collapsing with its nested h4 element) of 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: 1em 0; 42 } 43 44 div#child {margin: 1em 0 0;} 45 46 h4 47 { 48 width: 11em; 49 50 column-span: all; 51 } 52 ]]></style> 53 </head> 54 <body> 55 56 <div id="multi-column"> 57 na vy na vy 58 na vy na vy 59 60 <h4 id="first">black</h4> 61 62 <div id="child"> 63 <h4 id="nested">black</h4> 64 </div> 65 66 na vy na vy 67 na vy na vy 68 </div> 69 70 </body> 71 </html>