|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <head> |
|
4 <title>Percent widths on table cells</title> |
|
5 <style type="text/css"> |
|
6 |
|
7 table { |
|
8 border-spacing: 0; |
|
9 padding: 0; |
|
10 border: none; |
|
11 empty-cells: show; |
|
12 } |
|
13 |
|
14 td { |
|
15 border: 1px solid; |
|
16 padding: 0; |
|
17 } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 |
|
23 <!-- column min widths must match tests, since we have to size slightly |
|
24 smaller than percents because of the extra space from the borders --> |
|
25 <table width="100%"><tr height="50"> |
|
26 <td style="background:yellow" width="40%"><div style="width:100px"></div></td> |
|
27 <td style="background:aqua" width="40%"><div style="width:100px"></div></td> |
|
28 <td style="background:fuchsia" width="20%"><div style="width:100px"></div></td> |
|
29 <td style="background:blue"></td> |
|
30 </tr></table> |
|
31 |
|
32 </body> |
|
33 </html> |