Colgroup in ffox / chrome

I am testing a tag <colgroup>

on a 5 column table with style attribute.

I cannot get it to work on firefox 3.6 / chrome 5 tho and this is when I started looking for a link to w3c.
It seemed like my code was fine, but looking at the w3c editor I noticed that even this doesn't work. Only IE8 seems to work correctly, opera 10.51 ignores the style tag but applies the align tag correctly, and ffox and chrome seem to ignore the colgroup completely.

So what am I doing (and w3c) wrong? Was a colleague obscene and I missed him?

+2


a source to share


3 answers


Table cells are not descendants of the columns in which they reside (hierarchical data structures do not represent 2D data very well).



Hixie explains in detail: http://ln.hixie.ch/?count=1&start=1070385285

+3


a source


The CSS 2.1 standard allows very few properties to be applied to cells in columns, because cells are not true children of columns.

Some browsers, such as Firefox, adhere to these standards, while others allow more properties to take effect.



See: http://www.w3.org/TR/CSS2/tables.html#columns

If you want to apply other properties such as text alignment, you must give all the cells in the column the same class and apply the style to that class.

+1


a source


You can also match colum spec using sibling sibling selectors in css like:

td + td + td{... some style ....}

      

+1


a source







All Articles