If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

using style.display=block/none repeatedly on a tr breaks table

RESOLVED DUPLICATE of bug 97506

Status

()

Core
Layout: Tables
--
major
RESOLVED DUPLICATE of bug 97506
14 years ago
4 years ago

People

(Reporter: paul stanton, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 4

14 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

14 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

14 years ago
no

Updated

4 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.