Closed
Bug 262159
Opened 20 years ago
Closed 20 years ago
<col> tags are ignored for css formatting when using style or class attributes
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mark_fierling, Assigned: bugzilla)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10 here's some html to illustrate the problem: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style type="text/css"> #tab {border-collapse:collapse;width:100%;} #tab td {border:1px dotted black;} .number {text-align:right;color:red;} </style> </head> <body> <table id="tab" cellspacing="0"> <col><col style="text-align:center;"><col class="number"> <tbody> <tr><td>a1</td><td>b1</td><td>c1</td></tr> <tr><td>a2</td><td>b2</td><td>c2</td></tr> <tr><td class="number">a3</td><td style="text-align: right;">b3</td><td style="text-align: center;">c3</td></tr> <tr><td>a4</td><td>b4</td><td>c4</td></tr> </tbody> </table> </body> </html> this table should be rendered with the second column text centered and the thrid column text right aligned and red. The third row is rendered correctly as the css is applied at the cell level (except that the third cell - c3 - should be red, as it should inherit the css from the col tag). Reproducible: Always Steps to Reproduce: 1.paste the html code above into a texteditor (ie. notepad) 2.save as test.htm onto your computer (ie. desktop) 3.open the test.htm file in Firefox/Mozilla and observer the incorrect behaviour. 4.open in IE or any other recent, non mozilla browser and see how it should be interpreted. Actual Results: renders incorrectly - the col tag css is completely ignored when the table is rendered. Expected Results: it should use the css specified inside the col tags to render the table correctly.
Comment 1•20 years ago
|
||
Text-align and color do not apply to COL. See http://www.w3.org/TR/CSS21/tables.html#q4
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
(In reply to comment #1) > Text-align and color do not apply to COL. See > http://www.w3.org/TR/CSS21/tables.html#q4 Thank you for the fast response and sorry for not knowing my css2.1 specs properly :). Anyway I noticed that changing "color:red;" to "background:red;" doesn't work either, although according to http://www.w3.org/TR/CSS21/tables.html#q4 it should work (at least as far as i can tell). from the above w3.org link (17.3 Columns)... ---------------- The following properties apply to column and column-group elements: ... 'background' The background properties set the background for cells in the column, but only if both the cell and row have transparent backgrounds. See "Table layers and transparency." ----------------- please let me know if i'm mis-interpreting it (again) :( Thanks
u're not mis-interpreting(reading) but that part is bad written the notes immidiately below your quote from w3.org ------------- Here are some examples of style rules that set properties on columns...... col { border-style: none solid } table { border-style: hidden } col.totals { background: blue } table { table-layout: fixed } col.totals { width: 5em } ------------- but none of the css works on col in firefox PR1 u can't use style=".." nor class=".." Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10 try the following code: <body bgcolor=black> <table> <col background="red" style="background-color:red"> <tr><td>a1aaaaaa</td></tr> </table> </body> all black, no even 1 bit of red maybe u can give me a sample code
You need to log in
before you can comment on or make changes to this bug.
Description
•