fixed-table-layout-007.xht (1374B)
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: Fixed table width is maximum between table and sum of column 'width' (table width wins)</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#fixed-table-layout" /> 7 <meta name="assert" content="A fixed layout table's width will be its specified width if that width is greater than the sum of its columns' widths." /> 8 <style type="text/css"> 9 table 10 { 11 border-spacing: 0; 12 table-layout: fixed; 13 } 14 td 15 { 16 background: black; 17 padding: 0; 18 width: 50px; 19 } 20 #div1 21 { 22 background: blue; 23 height: 1em; 24 } 25 #div1, table 26 { 27 width: 200px; 28 } 29 </style> 30 </head> 31 <body> 32 <p>Test passes if the boxes below are the same width.</p> 33 <table> 34 <tr> 35 <td>X</td> 36 <td>X</td> 37 </tr> 38 </table> 39 <div id="div1"></div> 40 </body> 41 </html>