W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: [CSS2.1] col attributes: XHTML and CSS inconsistency?

From: Simetrical <simetrical@gmail.com>
Date: Tue, 30 Dec 2008 09:11:46 -0500
Message-ID: <7c2a12e20812300611w20308ea6xa96f485325b6cc7a@mail.gmail.com>
To: "Brad Kemper" <brad.kemper@gmail.com>
Cc: "Boris Zbarsky" <bzbarsky@mit.edu>, fantasai <fantasai.lists@inkedblade.net>, "\"Rainer Ã…hlfors\"" <rahlfors@wildcatsoftware.net>, "Tab Atkins Jr." <jackalmage@gmail.com>, mongolie2006-w3c@yahoo.fr, "CSS mailiing list W3C" <www-style@w3.org>

On Mon, Dec 29, 2008 at 10:06 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> Is it? I tend to think of it as the first cell stretching across the second,
> and taking its place, but not BEING the second cell (the second column cell
> is missing, because the first column cell is taking its place, just like in
> the markup).

Well, what uses do you generally see colspans being put to?  The first
use that comes to mind is on Wikipedia's "Comparison of" articles:

<tr><th>&nbsp; <th>Feature 1 <th>Feature 2 <th>Feature 3
<tr><th>Thing 1 <td colspan="3">Yes

In this case, the semantics are that "Yes" is the value for all three
columns.  If you wanted the third and fourth columns to be have no
entries at all, with "Yes" only being the value for column two, you'd
add the extra cells but leave them blank.

I guess that if Feature 3 was really important you might want to have

:nth-col(4) { font-weight: bolder; }

but then it's not clear if you'd want this to apply to the other two
features also, if a cell overlaps all three.  If you want to set apart
one column by styling it differently, you'd likely avoid colspans that
run over that row, so I'm not sure if it makes a difference how
colspans are treated here.  The advantage of :nth-col() would be that
you could safely style cells where colspans occurred *earlier* in the

> Rowspans are only irrelevant if they do not change what you consider to be
> the first cell in this scenario. Thus, if the first TD of the row above it
> had a rowspan, it would not change which TD you called the second column TD
> of the lower row. There would just be no matching TD:nth-col(1) on this
> lower row.

But a rowspan will never change whether a given cell matches an
:nth-col() rule under any scheme I can think of, so I don't see
anything to discuss here (whether nonexistent cells should be
Received on Tuesday, 30 December 2008 14:12:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:42 UTC