clear-applies-to-017.xht (2096B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: 'clear' applied to the table wrapper box (has 1 caption at bottom)</title> 8 9 10 11 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 12 13 <!-- 14 "(...) list of properties that are used on the table wrapper box and not 15 the table box. (...) this is the case for 'clear' as well: 16 If 'clear' is to have an effect, the table and its captions (if any) 17 should stay together and not be separated by clearance. 18 Re: [CSS21] The 'clear' property on table wrappers. 19 http://lists.w3.org/Archives/Public/www-style/2012Jun/0072.html 20 --> 21 22 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#flow-control" /> 23 <link rel="match" href="../floats-clear/clear-applies-to-009-ref.xht" /> 24 25 <meta name="assert" content="The 'clear' property apply to elements with a display of 'table' and is applied to the table wrapper box and not on the table box. In this test, the table wrapper box has a table caption placed after the table box." /> 26 27 <style type="text/css"><![CDATA[ 28 body {margin: 8px;} 29 30 p 31 { 32 float: left; 33 line-height: 1.25; 34 margin: 1em 0; 35 width: 320px; 36 } 37 38 div#table 39 { 40 background-color: blue; 41 clear: both; 42 display: table; 43 table-layout: fixed; 44 width: 1in; 45 } 46 47 div.row {display: table-row;} 48 49 div.cell 50 { 51 color: blue; 52 display: table-cell; 53 height: 0.25in; 54 } 55 56 div#caption 57 { 58 background-color: blue; 59 caption-side: bottom; 60 color: blue; 61 display: table-caption; 62 height: 0.5in; 63 width: 1in; 64 } 65 ]]></style> 66 67 </head> 68 69 <body> 70 71 <p>Test passes if there is a filled blue square <strong>below this text</strong>.</p> 72 73 <div id="table"> 74 75 <div class="row"> 76 <div class="cell">a</div><div class="cell">b</div> 77 </div> 78 79 <div class="row"> 80 <div class="cell">c</div><div class="cell">d</div> 81 </div> 82 83 <div id="caption">cap</div> 84 85 </div> 86 87 </body> 88 </html>