table-layout-inherited-001

Table-layout is not inherited by default

WeasyPrint

This browser

Flags
ahem
Assertion
Table-layout is not inherited by default.

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: Table-layout is not inherited by default</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#propdef-table-layout">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#width-layout">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="Table-layout is not inherited by default.">
10         <style type="text/css">
11             div
12             {
13                 font: 20px/1em Ahem;
14             }
15             #div1
16             {
17                 table-layout: fixed;
18             }
19             table
20             {
21                 background: black;
22                 border-spacing: 0;
23                 width: 10em;
24             }
25             colgroup
26             {
27                 width: 5em;
28             }
29             td
30             {
31                 overflow: hidden;
32                 padding: 0;
33             }
34             #div2
35             {
36                 background: blue;
37                 height: 2em;
38                 width: 20em;
39             }
40         </style>
41     </head>
42     <body>
43         <p>Test passes if the black box is at least as wide as the blue box.</p>
44         <div id="div1">
45             <table>
46                 <colgroup></colgroup>
47                 <colgroup></colgroup>
48                 <tr>
49                     <td>XXXXX</td>
50                     <td>XXXXX</td>
51                 </tr>
52                 <tr>
53                    <td>XXXXXXXXX0</td>
54                    <td>XXXXXXXXX0</td>
55                 </tr>
56             </table>
57         </div>
58         <div id="div2"></div>
59     </body>
60 </html>