Closed Bug 290444 Opened 20 years ago Closed 20 years ago

"display: inherit;" applied to TR moves all cells under first cell of previous line

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: vargenau, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.7.5) Gecko/20041221 Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.7.5) Gecko/20041221 I have a table of 3 rows of 6 cells. The second row is painted red by applying "background-color: red;" to the TR. If I apply "display: inherit;" to the TR, all red cells are moved under the first cell of the first row. Reproducible: Always Steps to Reproduce: Load file "bug.html" Actual Results: All red cells are moved under the first cell of the first row. Expected Results: I would expect a "normal" table like file "normal.html". Internet Explorer displays "bug.html" like "normal.html". Opera displays all red cells under the first cell of the first row AND does the same for the third row.
Attached file Expected display
Keywords: testcase
This is not because of 'display:inherit'. This is because you are applying 'display:table-row-group' to the TR element (albeit indirectly). Not sure what the result should be though; Opera does something different.
OS: Solaris → All
Hardware: Sun → All
Mozilla's rendering is correct. See http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes for the reason. Note that IE doesn't really allow display changes on HTML table-related elements, other than to "none". So IE is just ignoring your CSS altogether.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
as Boris said, dont compare to IE if display types are involved
Status: RESOLVED → VERIFIED
Please note that IE is correct per CSS 2.1 as browsers may ignore 'display' on HTML table elements. (<http://www.w3.org/TR/CSS21/tables.html#q2>)
Thank you for the explanation. In fact, what I wanted to do is the following. I want do display or not some rows in the table, depending in the style sheet used. In the "display all rows" style sheet, I had put "display: inherit;" and in the "display only relevant rows" style sheet, I had put "display: none;" So the question is: what should I put instead of "display: inherit;" ?
display:table-row
Thank you.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: