table-layout-applies-to-014.xht (1808B)
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-cell' 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-cell' 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: 10em; 21 } 22 #tr 23 { 24 display: table-row; 25 } 26 #test 27 { 28 background: black; 29 display: table-cell; 30 font: 1em Ahem; 31 overflow: hidden; 32 padding: 0; 33 table-layout: fixed; 34 } 35 #reference 36 { 37 background: blue; 38 height: 1em; 39 width: 20em; 40 } 41 </style> 42 </head> 43 <body> 44 <p>Test passes if both bars below are the same width.</p> 45 <div id="table"> 46 <div id="colgroup"></div> 47 <div id="tr"> 48 <div id="test">XXXXXXXXX0XXXXXXXXX0</div> 49 </div> 50 </div> 51 <div id="reference"></div> 52 </body> 53 </html>