Closed
Bug 280908
Opened 21 years ago
Closed 21 years ago
layout problems when changing the css display property of a table row via javascript
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: joachim.wendenburg, Assigned: bugzilla)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217
hi mozillas,
using javascript I switch the css property "display" of a table row from "none"
to "block" and back again. The table-layout gets completly incorrect. Internet
Explorer does it right.
Reproducible: Always
Steps to Reproduce:
copy my example and click "block/none" some times:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<style type="text/css">
table {width: 300; background-color:#e9e9e9;}
td {border: 1px solid #000;}
#r2 {display:none;}
</style>
<script type="text/javascript">
var stat = false;
function swap() {
document.getElementById('r2').style.display = stat? "none" : "block";
stat = stat? false : true;
}
</script>
</head>
<body>
<table>
<tr id="r1">
<td>row 1</td>
</tr>
<tr id="r2">
<td>row 2</td>
</tr>
<tr id="r3">
<td>row 3</td>
</tr>
</table><br>
<a href="#" onclick="swap();return false">block/none</a>
</body>
</html>
Actual Results:
The row is not displayed properly
Expected Results:
just display or hide the row. Compare to Internet Explorer (I hate to say that)
This happens in Mozilla 1.7 as well
Comment 1•21 years ago
|
||
Default value of the table row is "table-row", instead toggle between "none" and
"" for a cross-browser solution.
*** This bug has been marked as a duplicate of 97506 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Updated•21 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•