fixed-table-layout-014

Fixed table layout - specified column width overrides specified column-group width

WeasyPrint

This browser

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