Closed Bug 137779 Opened 23 years ago Closed 23 years ago

table columns ignore CSS class from col tag in tables

Categories

(Core :: Layout: Tables, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 4510

People

(Reporter: binkley, Assigned: karnaze)

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9) Gecko/20020311 BuildID: 2002031104 Mozilla 0.9.9 ignores CSS class in the col tag in tables; the appropriate style is not applied to the given columns in the table. The example (see reproduce section) works correctly with MSIE 6.0 (g-d forbid) as specified in HTML 4.0 and XHMTL 1.0/1.1. Reproducible: Always Steps to Reproduce: 1. Create an HTML 4.0/XML 1.0/XML 1.1 document. 2. Add a CSS style: <style type="text/css"> .teletype { color: limegreen; background-color: black; } </style> 3. Add a table with a col tag applying the style: <table> <col span="2" class="teletype" /> <thead> <tr> <th>I</th> <th>Am</th> <th>Sam</th> </tr> </thead> <tbody> <tr> <td>Sam</td> <td>I</td> <td>Am</td> </tr> </tbody> </table> 4. View the document. Here is my sample: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Sam I Am</title> <style type="text/css"> .teletype { color: limegreen; background-color: black; } </style> </head> <body> <table> <col span="2" class="teletype" /> <thead> <tr> <th>I</th> <th>Am</th> <th>Sam</th> </tr> </thead> <tbody> <tr> <td>Sam</td> <td>I</td> <td>Am</td> </tr> </tbody> </table> </body> </html> Actual Results: Mozilla did not apply the style to the first two columns of the table. Expected Results: The first two columns of the example table should be limegreen on black, not the default colors. MSIE 6.0 displays the table correctly. *sigh*
"color" from <col> should not be applied to <td> per CSS2: See the CSS2 spec, http://www.w3.org/TR/REC-CSS2/tables.html#q4 Basically, the only styles applied to COL tags that can affect the way cells look are border, background, width, and visibility. The fact that we do not apply background is bug 4510. *** This bug has been marked as a duplicate of 4510 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Attached file testcase form the reporter (deleted) —
Confirmed.. the col element does not work with CSS background-color.
Verified dupe of bug# 4510. I was searching for this bug.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: