table-layout-applies-to-009.xht (2214B)
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 Test: Table-layout and 'display: table-header-group' elements</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#propdef-table-layout" /> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#width-layout" /> 8 <meta name="flags" content="ahem" /> 9 <meta name="assert" content="Table-layout does not apply to 'display: table-header-group' elements." /> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style type="text/css"> 12 #table 13 { 14 display: table; 15 width: 10em; 16 } 17 .colgroup 18 { 19 display: table-column-group; 20 width: 5em; 21 } 22 #test 23 { 24 display: table-header-group; 25 table-layout: fixed; 26 } 27 .tr 28 { 29 display: table-row; 30 } 31 .td 32 { 33 background: black; 34 display: table-cell; 35 font: 1em Ahem; 36 overflow: hidden; 37 padding: 0; 38 } 39 #reference 40 { 41 background: blue; 42 height: 2em; 43 width: 20em; 44 } 45 </style> 46 </head> 47 <body> 48 <p>Test passes if both bars below are the same width.</p> 49 <div id="table"> 50 <div class="colgroup"></div> 51 <div class="colgroup"></div> 52 <div id="test"> 53 <div class="tr"> 54 <div class="td">XXXXX</div> 55 <div class="td">XXXXX</div> 56 </div> 57 <div class="tr"> 58 <div class="td">XXXXXXXXX0</div> 59 <div class="td">XXXXXXXXX0</div> 60 </div> 61 </div> 62 </div> 63 <div id="reference"></div> 64 </body> 65 </html>