I’m trying to format a column in a <table/> using a <col/> element. I can set background-color, width, etc., but can’t set the font-weight. Why doesn’t it work?
<table> <col style='font-weight:bold; background-color:#CCC;'> <col> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>3</td> <td>4</td> </tr> </table>
As far as I know, you can only format the following using CSS on the
<col>element:This page has more info.
Herb is right – it’s better to style the
<td>‘s directly. What I do is the following:This won’t work in IE however.