fixed-table-layout-001

Fixed table layout when 'width' property is 'auto'

WeasyPrint

This browser

Flags
ahem
Assertion
If a browser supports fixed table layout when 'width' is 'auto', a table will size to its containing block, minus any margin space (modified example from spec section 17.5.2.1).

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 when 'width' property is 'auto'</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="ahem">
 8         <meta name="assert" content="If a browser supports fixed table layout when 'width' is 'auto', a table will size to its containing block, minus any margin space (modified example from spec section 17.5.2.1).">
 9         <style type="text/css">
10             #div1
11             {
12                 border: solid blue;
13                 width: 200px;
14             }
15             table
16             {
17                 border-collapse: collapse;
18                 margin-left: 50px;
19                 margin-right: 50px;
20                 table-layout: fixed;
21             }
22             td
23             {
24                 font: 62.8% Ahem;
25                 padding: 0;
26             }
27         </style>
28     </head>
29     <body>
30         <p>Test passes if the black box is centered within the blue box below.</p>
31         <div id="div1">
32             <table>
33                 <tr>
34                     <td>XXXXXXXXXX</td>
35                 </tr>
36             </table>
37         </div>
38     </body>
39 </html>