fixed-table-layout-012

Fixed table layout - specified column width overrides first-cell specified width

WeasyPrint

This browser

Assertion
A column element with specified width sets the width of the column, even if the first-row cell has a specified width.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 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="help" href="http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout">
 7         <meta name="flags" content="">
 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: collapse;
13                 table-layout: fixed;
14                 width: 200px;
15             }
16             #col
17             {
18                 width: 50px;
19             }
20             #cell
21             {
22                 background: black;
23                 width: 175px;
24             }
25             #div1
26             {
27                 background: blue;
28                 height: 1em;
29                 width: 50px;
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if the boxes below are the same width.</p>
35         <table>
36             <col id="col">
37             <col>
38             <tr>
39                 <td id="cell">X</td>
40                 <td></td>
41            </tr>
42         </table>
43         <div id="div1"></div>
44     </body>
45 </html>