Forum Moderators: not2easy

Message Too Old, No Replies

Styling for a whole table column

         

Echil0n

9:32 am on Jan 8, 2009 (gmt 0)

10+ Year Member



I'm sure I read a while ago about a way to style a whole column in a table by adding scope="col" and using a certain CSS selector, but I can't remember what it was. Is there any other way to apply a style to a whole column without setting a class for each cell?

swa66

10:16 pm on Apr 4, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry for the late reply.

A <col> is a html tag you can use inside a <table>.

It supports the class and id attributes so you should be able to target them by CSS.

I've never played with it, but the CSS standard is rather strict in what you're supposed to use:
[w3.org...]
- border
- background
- width
- visibility

nothing else ...

If you want to understand why this is (highly technical):
[ln.hixie.ch...]