1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
8 function dumpsizes(tblid
) {
9 var view
= document
.defaultView
;
10 var table
= document
.getElementById(tblid
);
11 var target
= document
.getElementById("target");
12 var tablewidth
= view
.getComputedStyle(table
, "").getPropertyValue("width");
13 target
.appendChild(document
.createTextNode("Specified table width: " + table
.style
.width
+ "\n"));
14 target
.appendChild(document
.createTextNode("Actual table width: "+tablewidth
+"\n"));
15 var tds
= table
.getElementsByTagName("td");
16 target
.appendChild(document
.createTextNode("Specified TD widths: "));
17 for (var i
= 0 ; i
< tds
.length
; ++i
) {
18 target
.appendChild(document
.createTextNode(tds
[i
].style
.width
+ " "));
20 target
.appendChild(document
.createTextNode("\n"));
22 target
.appendChild(document
.createTextNode("Actual TD widths: "));
23 for (var i
= 0 ; i
< tds
.length
; ++i
) {
24 target
.appendChild(document
.createTextNode(view
.getComputedStyle(tds
[i
], "").getPropertyValue("width") + " "));
26 target
.appendChild(document
.createTextNode("\n\n"));
31 <body onload=
"dumpsizes('table1'); dumpsizes('table2'); dumpsizes('table3'); dumpsizes('table4'); dumpsizes('table5'); dumpsizes('table6');">
32 <table style=
"table-layout: fixed; width: 25px" border=
"0" cellspacing=
"0" cellpadding=
"0" id=
"table1">
34 <td style=
"width: 1px"></td>
35 <td style=
"width: 1px"></td>
36 <td style=
"width: 1px"></td>
37 <td style=
"width: 1px"></td>
38 <td style=
"width: 1px"></td>
39 <td style=
"width: 1px"></td>
40 <td style=
"width: 1px"></td>
41 <td style=
"width: 1px"></td>
42 <td style=
"width: 1px"></td>
43 <td style=
"width: 1px"></td>
44 <td style=
"width: 1px"></td>
45 <td style=
"width: 1px"></td>
46 <td style=
"width: 1px"></td>
47 <td style=
"width: 1px"></td>
48 <td style=
"width: 1px"></td>
49 <td style=
"width: 1px"></td>
50 <td style=
"width: 8px"></td>
54 <table style=
"table-layout: fixed; width: 12px" border=
"0" cellspacing=
"0" cellpadding=
"0" id=
"table2">
56 <td style=
"width: 1px"></td>
57 <td style=
"width: 1px"></td>
58 <td style=
"width: 1px"></td>
59 <td style=
"width: 1px"></td>
60 <td style=
"width: 8px"></td>
64 <table style=
"table-layout: fixed; width: 13px" border=
"0" cellspacing=
"0" cellpadding=
"0" id=
"table3">
66 <td style=
"width: 1px"></td>
67 <td style=
"width: 1px"></td>
68 <td style=
"width: 1px"></td>
69 <td style=
"width: 1px"></td>
70 <td style=
"width: 8px"></td>
74 <table style=
"table-layout: fixed; width: 24px" border=
"0" cellspacing=
"0" cellpadding=
"0" id=
"table4">
76 <td style=
"width: 1px"></td>
77 <td style=
"width: 1px"></td>
78 <td style=
"width: 1px"></td>
79 <td style=
"width: 1px"></td>
80 <td style=
"width: 8px"></td>
84 <table style=
"table-layout: fixed; width: 25px" border=
"0" cellspacing=
"0" cellpadding=
"0" id=
"table5">
86 <td style=
"width: 1px"></td>
87 <td style=
"width: 1px"></td>
88 <td style=
"width: 1px"></td>
89 <td style=
"width: 1px"></td>
90 <td style=
"width: 8px"></td>
95 <table style=
"table-layout: fixed; width: 17px" border=
"0" cellspacing=
"0" cellpadding=
"0" id=
"table6">
97 <td style=
"width: 10%"></td>
98 <td style=
"width: 10%"></td>
99 <td style=
"width: 10%"></td>
100 <td style=
"width: 10%"></td>
101 <td style=
"width: 10%"></td>
102 <td style=
"width: 10%"></td>
103 <td style=
"width: 10%"></td>
104 <td style=
"width: 10%"></td>
105 <td style=
"width: 10%"></td>
106 <td style=
"width: 10%"></td>