styles in col & colspan elements

Hey all,
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?
Surly any style which works on a td or tbody element should work on the 
columns too!

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). I didn't bother testing with other 
browsers.
The visibility property seems to be equally ignored, but setting the 
background-color works on Opera and Safari, but not Mozilla.

Do the specifications require ALL col/colgroup styles to be inherited 
by the relevant cells, or is it up to implementers to decide what gets 
inherited and what gets ignored?

I drew up this table for the <col> element with a few properties:
('-' = fail; 'X' = pass; 'buggy' = does something but not what it 
should)


Property        Mozilla  Safari  Opera

display:
  none            buggy     -       -
  table-column      X       X       X
  block           buggy   buggy   buggy
  inline          buggy   buggy   buggy
  inline-block      X     buggy   buggy
visibility:
  visible           X       X       X
  hidden            -       -       -
  collapse          -       -       -
color              -       -       -
background-color   -       X       X
white-space        -       -       -
font-weight        -       -       -
font-style         -       -       -
font-size          -       -       -
font-family        -       -       -
text-decoation     -       -       -
text-align         -       -       -
vertical-align     -       -       -
margin           void    void    void
padding            -       -       -
border             -       -       -
overflow:
  visible         buggy   buggy   buggy
  hidden          buggy   buggy   buggy
  scroll          buggy   buggy   buggy
position:
  relative          -       -       -   (right: 60px)
  absolute          -     buggy   buggy (left:  60px)
float              -     buggy     -
list-style-type    -       -       -
list-style-pos.    -       -       -


Some of these seem to caused by a lack of support in <td> elements for 
the specified style, such as this:

<html><body><table border="1">
<tr><td style="width: 40px; white-space: pre; overflow: hidden;">one 
two three four five

Which should look something like this:

+-------------+
| one two thr |
+-------------+
  |<-  40px ->|

But no browser renders that correctly either :-(
Are we likely to see these issues resolved soon or will i have to 
kidnap the programmers' families first? :-)


Also, is there a definition of what should happen in this case:

<html><body><table style="color: red;">
<col style="background-color: yellow;">
<col style="color: blue;">
<tr><td colspan="2">some text

Are the two styles merged (which takes precedence?) or does the cell 
only take on the styles of one column?
(i.e. is the cell text red or blue?)
Opera and Safari, when presented with conflicting background colours 
take that specified by the first column. If this is not defined, should 
it be?

- Nick.

Received on Tuesday, 11 May 2004 17:31:30 UTC