You are here: Home / Dog Blog / Archives

Styling Columns

Friday 26 December, 2003 ( 9:23PM GMT)

I've updated the Mastering Tables page in the HTML Advanced Guide to take on board the fact that you can only apply limited styles to table columns.

Originally, the page read (in relation to the col and colgroup tags): "In a peculiar twist, Internet Explorer leads the field in the implementation of these standard tags, whereas Mozilla, for example, won't take any notice". But, as Ian Hixon pointed out recently, the only reason IE takes notice when others don't is because it's a bit crazy. The more sensible, logical browsers like Mozilla actually do what they're supposed to and abide by the standards and the standards dictate that you can only apply borders, backgrounds, width and visibility properties to columns.


Comment 1

That Hixie thing is tres confusing.
Can someone explain it in English?

So said Mike on Saturday 27 December, 2003 at 2:22PM GMT.

Comment 2

Basically, the col elements are not parents of the table elements, they're at best uncles, so a td element cannot inherit property values from them. Borders, widths, backgrounds in cols are all independent of the content of the table cell, so they work. Fonts and such can't, because the table data elements aren't descendants of the col elements.

So said Neal on Monday 29 December, 2003 at 9:12AM GMT.

Comment 3

"The more sensible, logical browsers like Mozilla actually do what they're supposed to and abide by the standards...."

Ugh. Screw Mozilla...Opera 7 is the best!! I'm fast becoming a vocal defender of this wonderful browser!!!

IE does abide very well to the W3C DOM standards, but that doesn't count, does it?

So said Dante on Thursday 13 May, 2004 at 2:49AM GMT.

Comment 4

Even though a colgroup tag is an uncle, perhaps it should just behave like the child of the table tag, providing formatting guidelines to it (as if the column formatting tags were just table element attributes). That way, cells could inherit formatting from the table instead of the colgroup tags directly...

So said Andre on Friday 18 June, 2004 at 1:00AM GMT.

See Also

^ Top

SiteGround: Fast, reliable, recommended hosting.