I'm trying to use colgroup within a table to save myself some time but I'm running into a browser compatibility issue where it works fine in IE 6 but not in Firefox. Here's a quick example:
[blue]<table>
<colgroup>
<col align="center" width="10%">
<col align="center" width="10%">
<col align="left" width="70%">
<col align="center" width="10%">
</colgroup>
<TR>
<TD>1</TD>
<TD>1</TD>
<TD>This is a test</TD>
<TD>2001-2003</TD>
</TR>
</table>[/blue]
The idea is that the cells for columns 1, 2 and 4 should be centered within the column, without having to resort to adding an align attribute to each individual cell. This example seems to work for IE but not for Mozilla or Firefox. My HTML 4.x book as well as other online sources seem to indicate this is valid but does mention that "align" in colgroup is depreciated and that a style sheet should be used instead. Any ideas?
Thanks!
[blue]<table>
<colgroup>
<col align="center" width="10%">
<col align="center" width="10%">
<col align="left" width="70%">
<col align="center" width="10%">
</colgroup>
<TR>
<TD>1</TD>
<TD>1</TD>
<TD>This is a test</TD>
<TD>2001-2003</TD>
</TR>
</table>[/blue]
The idea is that the cells for columns 1, 2 and 4 should be centered within the column, without having to resort to adding an align attribute to each individual cell. This example seems to work for IE but not for Mozilla or Firefox. My HTML 4.x book as well as other online sources seem to indicate this is valid but does mention that "align" in colgroup is depreciated and that a style sheet should be used instead. Any ideas?
Thanks!