Closed Bug 245598 Opened 21 years ago Closed 21 years ago

Child Selector CSS doesn't work when table tag is used as one of the parents

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: u17865, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040601 Firefox/0.8.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040601 Firefox/0.8.0+ When using the CSS child selector, and placing "table" in as one of the parents (like so: "table > tr {}"), the css attributes do not get applied. Reproducible: Always Steps to Reproduce:
Attached file Testcase demonstrating issue (obsolete) —
This testcase creates a simple table with one cell. It then applies the following style information: table > tr > td { background-color:red; } Actual results: The background of the cell remains white (the default page background color) Expected results: The background of the cell should turn red. Note: I am not sure if there is any W3C spec that says tables should act differently; so... I am guessing that this could be a bug.
There's a TBODY in there whether you write it or not. See the HTML 4.01 spec.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
This new testcase shows that it works when table is not a parent, but is a child. For example, "div > table {}" works, but "table > tr {}" and "div > table > tr {}" does not. I am not sure if it is a problem with table being a parent or with the table>tr relationship. Note that "table tr {}" works. Is there something in the W3C specs that state that tr is not a child of table?
Attachment #150031 - Attachment is obsolete: true
(In reply to comment #2) > There's a TBODY in there whether you write it or not. See the HTML 4.01 spec. Thank you for the information. That answers my question.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: