Re: styles in col & colspan elements

Nicholas Shanks wrote:
> I don't know if this is just a lack of implementation or I'm 
> misunderstanding the specifications, but are the col and colspan 
> elements special with regards to what styles they accept?

Both (that is, both a misunderstanding and a lack of implementation), based on 
what you say below.

> Surly any style which works on a td or tbody element should work on the 
> columns too!

Not according to http://www.w3.org/TR/CSS21/tables.html#q4

> For instance, toggling their display property between none and 
> table-column/table-column-group seems to have no effect in Mozilla 
> (1.6), Safari (1.2) and Opera (7.5).

That would be lack of implementation, if true (depends on what sort of effect 
you expected it to have).

> The visibility property seems to be equally ignored, but setting the 
> background-color works on Opera and Safari, but not Mozilla.

This last is fixed in current builds of Mozilla (in standards mode in 1.7 and in 
both modes in 1.8a builds).

Visibility sounds like lack of implementation.

> Do the specifications require ALL col/colgroup styles to be inherited by 
> the relevant cells

No.  They do not.  In fact NONE of the col/colgroup styles are inherited by the 
relevant cells, since the cells are not descendants of the col/colgroup....

>  none            buggy     -       -
>  table-column      X       X       X
>  block           buggy   buggy   buggy
>  inline          buggy   buggy   buggy
>  inline-block      X     buggy   buggy

I'd be curious as to what you think some of these should do....

> color              -       -       -

Not supported on table columns in CSS2.1.  Same for most of the other properties 
you tested.

-Boris

Received on Tuesday, 11 May 2004 17:57:25 UTC