Re: [selectors4] Styling table column child elements

On Mon, Mar 18, 2013 at 5:26 PM, "GĂ©rard Talbot" <www-style@gtalbot.org> wrote:
> td:first-child + td + td { ... declaration block ...}
>
> will select cells in 3rd column and is often recommended for CSS 2.1 and
> considered the traditional way to code this in CSS 2.1.

This works badly in the presence of spanning cells, and forces you
into referring to cells by column number.

> In example 52:
>
>   <tr><td span="2">D <td>E
>   <tr><td>F <td span="2">G
>
> should be instead/rather
>
>   <tr><td colspan="2">D <td>E
>   <tr><td>F <td colspan="2">G
>
> Also, example 52 is a rather weak example as
>
> col.selected { background: yellow; }
>
> seems that it should/would suffice too.
>
> This example 52 is not very convincing with regards to how the "||"
> (column combinator) can achieve more or better or overcome difficulties
> that the traditional way is already doing well in this example.

Thanks, I've fixed the markup error and made the CSS apply properties
that can't be simply set on <col>.

~TJ

Received on Tuesday, 19 March 2013 00:54:06 UTC