fixed-table-layout-006.xht (1564B)
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: Remaining table width is divided evenly among non auto-sized columns (minus borders and cell spacing)</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="Any remaining horizontal table space is divided evenly among columns which do not have specified widths (minus borders and cell spacing)." /> 8 <style type="text/css"> 9 table 10 { 11 background: blue; 12 border-collapse: separate; 13 border-spacing: 10px 0; 14 table-layout: fixed; 15 width: 130px; 16 } 17 td 18 { 19 background: blue; 20 border-left: 10px solid orange; 21 border-right: 10px solid orange; 22 height: 100px; 23 padding: 0; 24 } 25 #specified 26 { 27 width: 10px; 28 } 29 </style> 30 </head> 31 <body> 32 <p>Test passes if all of the blue lines below appear to have the same width.</p> 33 <table> 34 <tr> 35 <td id="specified"></td> 36 <td></td> 37 <td></td> 38 </tr> 39 </table> 40 </body> 41 </html>