table-layout-002.xht (1594B)
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 set to 'fixed'</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="Cell content width is not taken into account in the used width of a table when the table has 'table-layout' set to 'fixed'." /> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style type="text/css"> 12 table, div 13 { 14 font: 1em Ahem; 15 } 16 table 17 { 18 background: black; 19 border-spacing: 0; 20 overflow: hidden; 21 table-layout: fixed; 22 width: 5em; 23 } 24 td 25 { 26 padding: 0; 27 } 28 div 29 { 30 background: black; 31 margin-top: 10px; 32 width: 5em; 33 } 34 </style> 35 </head> 36 <body> 37 <p>Test passes if both bars below are the same width.</p> 38 <table> 39 <tr> 40 <td>XXXXXXXX</td> 41 <td>XXXXXXXX</td> 42 </tr> 43 </table> 44 <div>X</div> 45 </body> 46 </html>