fixed-table-layout-012.xht (1680B)
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 column width overrides first-cell specified width</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2016-05-31 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout" /> 8 <meta name="assert" content="A column element with specified width sets the width of the column, even if the first-row cell has a specified width." /> 9 <style type="text/css"> 10 table 11 { 12 border-collapse: separate; 13 border-spacing: 0px; 14 table-layout: fixed; 15 width: 200px; 16 } 17 #col 18 { 19 width: 50px; 20 } 21 #cell 22 { 23 background: orange; 24 color: orange; 25 width: 175px; 26 } 27 #div1 28 { 29 background: blue; 30 height: 21px; 31 width: 50px; 32 } 33 </style> 34 </head> 35 <body> 36 <p>Test passes if the orange and blue stripes have the same width.</p> 37 <table> 38 <col id="col" /> 39 <col /> 40 <tr> 41 <td id="cell">X</td> 42 <td></td> 43 </tr> 44 </table> 45 <div id="div1"></div> 46 </body> 47 </html>