Forum Moderators: not2easy
Something like
<table>
<colgroup>
<col>
<col class="numbers">
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Cost</th>
</tr>
</thead>
<tbody>
<tr>
<td>Flowers</td>
<td>10.0</td>
</tr>
<tr>
<td>Vase</td>
<td>5.0</td>
</tbody>
</table>
And the CSS:
.numbers {
text-align : right;
font-family : monospace;
}
It works in IE, but doesn't in Opera or Mozilla for some reason. I'm confused here - is it Moz and Opera that simply doesn't support this yet, or is IE going against the standard like usual? Which one is "right" and "wrong" about this?
You have to have a closing tag for each COL tag.
see here >> [w3schools.com...]
I tried to use col on a calendar to highlight weekends, but then found bug 4510. I'm glad its getting fixed RSN (along with another bug I filed 10 months ago, and submitted a patch for).
You aren't using them properly.You have to have a closing tag for each COL tag.
see here >> [w3schools.com...]
Actually...
In HTML the <col> tag has no end tag.Since I'm not using XHTML I am using them properly. :p
Anyhow, I'd say that <colgroup> and <col> are both really useful. And I think I've found a way to make use of <thead>, <tbody> and <tfoot> as well.
Hmm. For once IE is better at handling the standard than Moz and Opera is. I'm impressed. Oh well, I'll just use the "Too bad for Moz/Opera" rule and style it anyway, then wait for them to catch up. Thanks for the help, appreciate it. :)