FireFox 1.5 and table columns not working as expected.


I'm using FireFox 1.5.0.2 on WinXP.

When trying to display the example HTML table listed bellow FF ignores the <COL> tags.
The last column displays as red in IE 6 but not FF.

Anyidea's



example from: http://www.htmlcodetutorial.com/tables/_COL.html

<TABLE BORDER CELLPADDING=5>

<COL>
<COL ALIGN=RIGHT>
<COL STYLE="color:red">

<TR> <TH>Expense</TH> <TH>Price</TH> <TH>Status</TH> </TR>
<TR> <TD>office suite</TD> <TD>1,343.56</TD> <TD>rental</TD> </TR>
<TR> <TD>cabling</TD> <TD>1.25</TD> <TD>installed</TD> </TR>
</TABLE>
Matthew_WayAsked:
Who is Participating?
 
EsopoCommented:
Apparently FF has been having support issues with <col> and <colgroup> since ever, with a bug report starting in 1998.

Although it does support some CCS styling on the tags:
http://511.dabomb.com.ar/testcase/col-colgroup-css/2.html

If the behavior expected from the col tags is important I would consider not using them in favor of CSS styling:
http://academ.hvcc.edu/~kantopet/old/css/index.php?page=css+table+styling&parent=css+boxes
0
 
tordanaCommented:
Yep it's not a problem with your end... this is a known issue with FF and one of the few things it doesn't handle properly.
0
 
amebaCommented:
In FF bug database they suggest workaround - adding one line to style section.
Your sample:

<html>
<head>
<style type="text/css"><!--
/* FF, for IE see col */
table td:first-child+td+td {color:red;}
--></style>
</head>

<body>
<TABLE BORDER CELLPADDING=5>
<colgroup>
 <COL>
 <COL ALIGN=RIGHT>
 <COL STYLE="color:red">
</colgroup>
<TR> <TH>Expense</TH> <TH>Price</TH> <TH>Status</TH> </TR>
<TR> <TD>office suite</TD> <TD>1,343.56</TD> <TD>rental</TD> </TR>
<TR> <TD>cabling</TD> <TD>1.25</TD> <TD>installed</TD> </TR>
</TABLE>
</body>
</html>

Another sample: http://www.eeqp.com/stats/2006/mrq2006_01_12.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.