fixed-table-layout-002

Value other than 'auto' for column width sets width of cells in the column

WeasyPrint

This browser

Assertion
A column element with a value other than 'auto' for the 'width' property sets the width for the column of cells it contains.

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: Value other than 'auto' for column width sets width of cells in the column</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 a value other than 'auto' for the 'width' property sets the width for the column of cells it contains.">
 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: 100px;
19             }
20             td
21             {
22                 padding: 0;
23             }
24             #cell
25             {
26                 background: black;
27             }
28             #div1
29             {
30                 background: blue;
31                 height: 1em;
32                 width: 100px;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if the boxes below are the same width.</p>
38         <table>
39             <col id="col">
40             <col>
41             <tr>
42                 <td id="cell">X</td>
43                 <td></td>
44            </tr>
45         </table>
46         <div id="div1"></div>
47     </body>
48 </html>