You are here: Home / Dog Blog / Archives

The Truth About Columns

Wednesday 12 May, 2004 ( 4:34PM GMT)

Table columns are crazy.

You've got your col and colgroup HTML elements that are used to collect together cells in a column.

THEN, you can apply CSS to a column, rather than being forced to work with rows. Great! That opens up the possibilities of styling tables a bit without having loads of classes all over the place.

But there's a catch. You can only use the background, border, visibility and width properties.

Well, at least that's something.

But the catch has a catch.

After some brief testing, it seems that Mozilla only supports width, Opera doesn't support visibility and border isn't supported by either of them or IE (which in it's peculiar manner supports more properties than even the spec suggests).

My cross-browser tests are limited (no Mac lovin' going on in this house), but it would seem that the only safe property you can apply to a column is width.

See? Crazy.


Comment 1

Not true! Mozilla supports 'background' and I believe 'visibility' as well. Download a newer build! ;-)

So said Anne on Wednesday 12 May, 2004 at 8:14PM GMT.

Comment 2

Hmm.... Really? I'm still using Mozilla 1.5b. Waiting for 1.7 proper to come out...
I have to say that background is the property I would find most useful.

So said Patrick on Wednesday 12 May, 2004 at 11:33PM GMT.

Comment 3

I don't like to wait so I test my CSS3 pages in 1.7 RC 1 (which supports the CSS3 ~ selector).

Someone posted a message about this on the www-style message board.

BTW Pat, ever thought of adding a 'remember me' function with the comments?

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

Comment 4

Wow. What a coincident. I was trying this out not an hour ago, and was blown away when Mozilla (Firefox) actually applied the background color to a column.

The devs are great.

So said Hemebond on Thursday 13 May, 2004 at 8:55AM GMT.

Comment 5

"no Mac lovin' going on in this house"

Same here. I thought all web standards guys liked Macs.

Please don't tell me you're a linux geek!

So said Dante on Friday 14 May, 2004 at 12:15AM GMT.

Comment 6

You think THAT's crazy?
I had styled FULL columns on a 20-column table using IE6.

It's so ironic... IE6 being the least compatible browser and it's the ONE browser that supports full-styling of cols and colgroups.

I said: WOW, cols rule! I'll test it in mozilla.

(5 seconds later:)


Then, as I read on the web about why Mozilla cannot style columns, i found out about the w3 guys and their own problems and discussions.

It was then that I realized that no matter how much technology and standards evolved, there would be ALWAYS compatibility problems.

That's when I wanted for the first time in my life to quit the web designer stuff and send it down the tube.

So said Rick on Tuesday 25 May, 2004 at 5:39PM GMT.

Comment 7

I'm still using Mozilla 1.5b. Waiting for 1.7 proper to come out...
I have to say that background is the property I would find most useful.

So said 下载 on Monday 13 September, 2004 at 1:52PM GMT.

Comment 8

i wonder how much of the comment spam problem has to do with the ubiquity of movable type. i've only gotten a handful of comment spams.You have done an exceptional job in creating and designing this website. My Congratulations to you!!Keep up this great resource.

So said on Tuesday 5 October, 2004 at 8:32AM GMT.

Comment 9

In my opinion,any HTML elements support most CSS style,inculding col and colgroup,we can use CSS like this:

So said google163 on Saturday 9 October, 2004 at 5:43PM GMT.

Comment 10

The new version Mozilla supports " width " now!

So said 供应链 on Tuesday 23 November, 2004 at 3:37AM GMT.

Comment 11

I have test on IE 6, Win2003 OS, it seens that it support colgroup's border and width properties, but don't support visibility properties.

So said Jam zerder on Sunday 28 November, 2004 at 8:02AM GMT.

Comment 12

I did a Google search about the <colgroup> borders not working. I found out that if you add the rules="none" attribute to your table then all <colgroup> borders work... It just screws up the rest of the table. (I've only tested this in Firefox.) Wierd huh?

So said Arthur Pope on Friday 27 May, 2005 at 9:18PM GMT.

See Also

^ Top

SiteGround: Fast, reliable, recommended hosting.