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 '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#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 taken into account in the used width of a table when the table has 'table-layout' set to 'auto'.">
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 table-layout: auto;
20 width: 5em;
21 }
22 td
23 {
24 padding: 0;
25 }
26 div
27 {
28 background: black;
29 margin-top: 10px;
30 width: 10em;
31 }
32 </style>
33 </head>
34 <body>
35 <p>Test passes if both bars below are the same width.</p>
36 <table>
37 <tr>
38 <td>XXXXX</td>
39 <td>XXXXX</td>
40 </tr>
41 </table>
42 <div>X</div>
43 </body>
44 </html>