class, id & style attributes in col (and colgroup) tags not being applied

RESOLVED DUPLICATE of bug 285184

Status

()

--
minor
RESOLVED DUPLICATE of bug 285184
12 years ago
12 years ago

People

(Reporter: Gerry, Unassigned)

Tracking

({testcase})

2.0 Branch
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

The following HTML renders with the styling applied correctly in IE7 but not Firefox 2.0.0.3 (the columns should be blue and red).

<html>
	<head>
		<style>
			#red { color:red; }
			.green { color:green; }
		</style>
	</head>
	<body>
		<table border="1">
			<col id="red">
			<col class="green">
			<col style="color:blue">
			<thead>
				<tr>
					<th>red</th>
					<th>green</th>
					<th>blue</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>column</td>
					<td>column</td>
					<td>column</td>
				</tr>
			</tbody>
		</table>
	</body>
</html>

Reproducible: Always

Steps to Reproduce:
Use HTML code or URL above.
Actual Results:  
All text shown in default color.

Expected Results:  
Left column red, center green, right blue.

Applied specified id, class, and style attributes to the table columns.
(Reporter)

Updated

12 years ago
Keywords: testcase
Version: unspecified → 2.0 Branch
Created attachment 266223 [details]
testcase from comment 0

It doesn't work in Opera either..
I think this bug is invalid.

http://www.w3.org/TR/CSS21/tables.html#q4

Dupe of bug 285184?

Comment 3

12 years ago
Indeed
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 285184
(Reporter)

Comment 4

12 years ago
http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-COL says that id, class, and style attributes should apply to col tags.

http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#adef-id says "Almost every HTML element may be assigned identifier and class information.".

Comment 5

12 years ago
CSS 2.1 noted in comment 2, is quite clear which style elements apply to the <col> element: borders, background, width and visibility.

CSS 2.0 has the same list
http://www.w3.org/TR/REC-CSS2/tables.html#q4.
See also
http://ln.hixie.ch/?start=1070385285&count=1
(Reporter)

Comment 6

12 years ago
I see, properties can only be inherited from ancestors, and <col> and <colgroup> elements aren't ancestors of <th> and <td> elements.  Except for those four properties: border, background, width, and visibility.  But if those four can be supported, why not more, at least a few of the more useful ones?  What good is being able to set the background color without the foreground?
You need to log in before you can comment on or make changes to this bug.