fixed-table-layout-015.xht (1669B)
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 layout - specified cell width overrides specified column-group width</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 column that has both a cell width and column-group width specified will use its cell specified width." /> 8 <style type="text/css"> 9 table 10 { 11 border-spacing: 0; 12 table-layout: fixed; 13 width: 200px; 14 } 15 #colgroup 16 { 17 width: 75px; 18 } 19 #cell 20 { 21 background: black; 22 width: 100px; 23 } 24 td 25 { 26 padding: 0; 27 } 28 #div1 29 { 30 background: blue; 31 width: 100px; 32 } 33 #div1, td 34 { 35 height: 1em; 36 } 37 </style> 38 </head> 39 <body> 40 <p>Test passes if the boxes below are the same width.</p> 41 <table> 42 <colgroup id="colgroup"> 43 <col /> 44 </colgroup> 45 <colgroup> 46 <col /> 47 </colgroup> 48 <tr> 49 <td id="cell"></td> 50 <td></td> 51 </tr> 52 </table> 53 <div id="div1"></div> 54 </body> 55 </html>