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 columns - assigning a fixed size to a column</title>
5 <link rel="author" title="W3C" href="http://www.w3c.org">
6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
7 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#columns">
8 <meta name="flags" content="">
9 <meta name="assert" content="A specific width can be set on a table column (modified example from section 17.3).">
10 <style type="text/css">
11 #reference
12 {
13 background: blue;
14 height: 1em;
15 width: 100px;
16 }
17 table
18 {
19 background: black;
20 table-layout: fixed;
21 width: 50px;
22 }
23 col.totals
24 {
25 width: 100px;
26 }
27 </style>
28 </head>
29 <body>
30 <p>Test passes if both bars below are the same width.</p>
31 <table cellspacing="0">
32 <col class="totals">
33 <tr>
34 <td>X</td>
35 </tr>
36 <tr>
37 <td>X</td>
38 </tr>
39 <tr>
40 <td>X</td>
41 </tr>
42 </table>
43 <div id="reference"></div>
44 </body>
45 </html>