table-layout-applies-to-007.xht (2030B)
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: inline-table' 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 applies to 'display: inline-table' elements." /> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style type="text/css"> 12 #test 13 { 14 display: inline-table; 15 table-layout: fixed; 16 width: 10em; 17 } 18 .colgroup 19 { 20 display: table-column-group; 21 width: 5em; 22 } 23 .tr 24 { 25 display: table-row; 26 } 27 .td 28 { 29 background: black; 30 display: table-cell; 31 font: 1em Ahem; 32 overflow: hidden; 33 padding: 0; 34 } 35 #reference 36 { 37 background: blue; 38 height: 2em; 39 width: 10em; 40 } 41 </style> 42 </head> 43 <body> 44 <p>Test passes if both bars below are the same width.</p> 45 <div id="test"> 46 <div class="colgroup"></div> 47 <div class="colgroup"></div> 48 <div class="tr"> 49 <div class="td">XXXXX</div> 50 <div class="td">XXXXX</div> 51 </div> 52 <div class="tr"> 53 <div class="td">XXXXXXXXX0</div> 54 <div class="td">XXXXXXXXX0</div> 55 </div> 56 </div> 57 <div id="reference"></div> 58 </body> 59 </html>