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>
...
I'm trying to create a table to display an individual's BMI.
As part of this, I'd like, on :hover, for the <tr> and <col> (or <colgroup>) to be highlighted also, in order for the intersection to be more apparent.
As the table will feature both metric and imperial measurements, the :hover doesn't have to stop at the cell (from any direc...
W3 specifies that only four CSS rules are allowed for table columns (with the <col> element) - border, background, width and visibility.
Does anyone know the reasons behind this decision? If you can have borders and backgrounds, why not fonts and colours?
...
My understanding of col is that it may be used to indicate a class for all the elements in a table's column. This doesn't seem to be working for me though. I can apply the class to individual td's, but I want col to help me avoid this.
Here is the html head:
<head>
<style type="text/css">
.slick {
background-color:#b0c4de; /*This ...