51 lines
1.3 KiB
HTML
51 lines
1.3 KiB
HTML
<html>
|
|
<head>
|
|
<style>
|
|
.count-table {
|
|
table-layout: fixed;
|
|
width: 100%;
|
|
}
|
|
|
|
.count-table-cell {
|
|
width: 0px;
|
|
}
|
|
|
|
.count-text {
|
|
overflow: hidden;
|
|
}
|
|
</style>
|
|
<script>
|
|
function setCountMessage() {
|
|
var tr = document.getElementById("row");
|
|
|
|
var countCell = document.createElement("td");
|
|
countCell.setAttribute("class", "count-table-cell");
|
|
tr.appendChild(countCell);
|
|
|
|
var countDiv = document.createElement("div");
|
|
countDiv.setAttribute("class", "count-text");
|
|
countDiv.innerHTML = "Success!";
|
|
countCell.appendChild(countDiv);
|
|
|
|
var right = document.createElement("td");
|
|
tr.appendChild(right);
|
|
|
|
var below = document.getElementById("below");
|
|
document.defaultView.getComputedStyle(below, null).getPropertyValue("width");
|
|
// without this, it shows up in both
|
|
countCell.style.width = 60 + "px"; // without this, is doesn't show up in either
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="setCountMessage();">
|
|
|
|
<table class="count-table">
|
|
<tr id="row"></tr>
|
|
</table>
|
|
|
|
<div id="below"></div>
|
|
|
|
</body>
|
|
</html>
|