зеркало из https://github.com/mozilla/pjs.git
113 строки
3.4 KiB
HTML
113 строки
3.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<style>
|
|
</style>
|
|
<script>
|
|
function dumpsizes(tblid) {
|
|
var view = document.defaultView;
|
|
var table = document.getElementById(tblid);
|
|
var target = document.getElementById("target");
|
|
var tablewidth = view.getComputedStyle(table, "").getPropertyValue("width");
|
|
target.appendChild(document.createTextNode("Specified table width: " + table.style.width + "\n"));
|
|
target.appendChild(document.createTextNode("Actual table width: "+tablewidth+"\n"));
|
|
var tds = table.getElementsByTagName("td");
|
|
target.appendChild(document.createTextNode("Specified TD widths: "));
|
|
for (var i = 0 ; i < tds.length; ++i) {
|
|
target.appendChild(document.createTextNode(tds[i].style.width + " "));
|
|
}
|
|
target.appendChild(document.createTextNode("\n"));
|
|
|
|
target.appendChild(document.createTextNode("Actual TD widths: "));
|
|
for (var i = 0 ; i < tds.length; ++i) {
|
|
target.appendChild(document.createTextNode(view.getComputedStyle(tds[i], "").getPropertyValue("width") + " "));
|
|
}
|
|
target.appendChild(document.createTextNode("\n\n"));
|
|
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="dumpsizes('table1'); dumpsizes('table2'); dumpsizes('table3'); dumpsizes('table4'); dumpsizes('table5'); dumpsizes('table6');">
|
|
<table style="table-layout: fixed; width: 25px" border="0" cellspacing="0" cellpadding="0" id="table1">
|
|
<tr>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 8px"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table style="table-layout: fixed; width: 12px" border="0" cellspacing="0" cellpadding="0" id="table2">
|
|
<tr>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 8px"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table style="table-layout: fixed; width: 13px" border="0" cellspacing="0" cellpadding="0" id="table3">
|
|
<tr>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 8px"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table style="table-layout: fixed; width: 24px" border="0" cellspacing="0" cellpadding="0" id="table4">
|
|
<tr>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 8px"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table style="table-layout: fixed; width: 25px" border="0" cellspacing="0" cellpadding="0" id="table5">
|
|
<tr>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 1px"></td>
|
|
<td style="width: 8px"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<table style="table-layout: fixed; width: 17px" border="0" cellspacing="0" cellpadding="0" id="table6">
|
|
<tr>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
<td style="width: 10%"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<pre id="target">
|
|
</pre>
|
|
</body>
|
|
</html> |