table-layout-002

Table-layout set to 'fixed'

WeasyPrint

This browser

Flags
ahem
Assertion
Cell content width is not taken into account in the used width of a table when the table has 'table-layout' set to 'fixed'.

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 set to 'fixed'</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="Cell content width is not taken into account in the used width of a table when the table has 'table-layout' set to 'fixed'.">
10         <style type="text/css">
11             table, div
12             {
13                 font: 1em Ahem;
14             }
15             table
16             {
17                 background: black;
18                 border-spacing: 0;
19                 overflow: hidden;
20                 table-layout: fixed;
21                 width: 5em;
22             }
23             td
24             {
25                 padding: 0;
26             }
27             div
28             {
29                 background: black;
30                 margin-top: 10px;
31                 width: 5em;
32             }
33         </style>
34     </head>
35     <body>
36         <p>Test passes if both bars below are the same width.</p>
37         <table>
38             <tr>
39                <td>XXXXXXXX</td>
40                <td>XXXXXXXX</td>
41             </tr>
42         </table>
43         <div>X</div>
44     </body>
45 </html>