Closed
Bug 224517
Opened 21 years ago
Closed 21 years ago
using style.display=block/none repeatedly on a tr breaks table
Categories
(Core :: Layout: Tables, defect)
Tracking
()
People
(Reporter: paul.stanton, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 using style.display=block/none repeatedly on a tr creates extra padding for row and mis-alignment of columns Reproducible: Always Steps to Reproduce: 1. visit http://wanto.f2o.org/****/trDisplay.html 2. repeatedly click button 'toggle' Actual Results: the row containing 'i am sam' shows and hides it's self, but with extra padding and mis-alignment Expected Results: the row containing 'i am sam' shows and hides it's self
*** Bug 224518 has been marked as a duplicate of this bug. ***
The default value of the 'display' property for table rows is 'table-row', not 'block', and except for the extra space being introduced below our behavior is correct. You're better off setting it to "" instead of "block" -- that should work across browsers. The valid issue is a duplicate.
Whiteboard: DUPEME
*** This bug has been marked as a duplicate of 97506 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 4•21 years ago
|
||
yes; using "" instead of "block" works for mozilla, as does "table-row", however, neither of these work in ie 6. not that this is mozilla-dev's problem, just a note for developers reading this, in order to achieve cross browser support, i will have to write detection code. :~(
Comment 5•21 years ago
|
||
Just out of curiosity, does this work in IE: <style> .a { display:none; } .b { display:block; display:table-row; } </style> document.getElementById("this_one").setAttribute('class', document.getElementById("this_one").getAttribute('class') == "a" ? "b" : "a");
Reporter | ||
Comment 6•21 years ago
|
||
no
You need to log in
before you can comment on or make changes to this bug.
Description
•