Closed Bug 112113 Opened 23 years ago Closed 23 years ago

style="display: block" causes TRs to display wrong

Categories

(Core :: Layout: Tables, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: raz, Assigned: karnaze)

References

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6) Gecko/20011120 BuildID: 2001112009 if you have a table with 2 rows, and the first fow has one col with colspan=2, and the 2nd row has two columns, setting the 2nd TR 's display to 'block' causes the tr to loose width attributes and nolonger go to the edge of the table. Reproducible: Always Steps to Reproduce: 1. run the code i attached 2. 3. displays problem... tr has display set to '' <table border=1> <tr> <td colspan=2> top row bla bla bla </td> </tr> <tr style="display: ;"> <td> 1 </td> <td> 2 </td> </tr> </table> tr has display set to 'none' <table border=1> <tr> <td colspan=2> top row bla bla bla </td> </tr> <tr style="display: none;"> <td> 1 </td> <td> 2 </td> </tr> </table> tr has display set to 'block' <table border=1> <tr> <td colspan=2> top row bla bla bla </td> </tr> <tr style="display: block;"> <td> 1 </td> <td> 2 </td> </tr> </table>
You should use display: table-row. See the CSS2 specs.
Not a DOM problem, if it's a problem at all...
Assignee: jst → karnaze
Component: DOM Style → HTMLTables
QA Contact: ian → amar
Normally a tr has display: table-row;. Obviously, the layout doesn't stay the same if you make it display: block;. (If it "works" in IE, IE is wrong.) Marking invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
I looked into the standard--you are correct. I was under the impression that block was a 'please show yes' symbol or something. In any case... the irony of the whole thing is that ie 5.5 produces wonderful runtime errors when you try to element.style.display='table-row' and works with 'block' and '' (for making visable after 'none'). I am faced with the task of developing a UI which uses many of these advanced features and works correctly in both browsers. I have found that setting display to '' makes both browsers show the TR again. Mozilla was working with the table-row setting also.. IE was wrong.
Verifying INVALID.
Status: RESOLVED → VERIFIED
*** Bug 114492 has been marked as a duplicate of this bug. ***
*** Bug 145967 has been marked as a duplicate of this bug. ***
*** Bug 147236 has been marked as a duplicate of this bug. ***
*** Bug 227048 has been marked as a duplicate of this bug. ***
i just filed a most likely duplicate bug-report over here (http://bugzilla.mozilla.org/show_bug.cgi?id=245748), which i'm sorry for. but i don't agree that this bug is invalid. i'm copying what i stated over there: ---------- i searched in the css2 specs (http://www.w3.org/TR/CSS21/tables.html#q2) and it looks like the style.display attribute should really be "table-row", like it is mentioned in the other bug. but the thing is, it neither works when set to "table-row", nor "table-cell", which should be okay too according to the specs. it only works when set to "" or "inline". also the fact, that the behavour is as expected when you remove the outer table or the height attribute, which seems completely unrelated to this, doesn't make this bug look invalid, at least to me. also IE5+ and Opera7.5 don't seem to be affected by this and displays it right every time. -------------- the comments on the tables are with respect to this testcase: http://bugzilla.mozilla.org/attachment.cgi?id=150159&action=view so in essence it looks to me that the bug is valid and there is indeed some misbehaviour of mozilla here, and this should be corrected.
*** Bug 297453 has been marked as a duplicate of this bug. ***
*** Bug 329495 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.