On Thu, Aug 12, 2010 at 10:44:48AM +0900, Philippe Wittenbergh wrote:
> 
> On Aug 12, 2010, at 10:23 AM, Rick Pasotto wrote:
> 
> > Every cell in the row has the same classname but I only want a different
> > style for the first and last cells (It's a calendar). The way the
> > template is written I have no way of applying a style to only some of
> > the cells in the row.
> 
> td:first-child, td:last-child { color: white; background: lime } ?
> 
> > 
> >> I don't think you can use col as a selector, because no elements are
> >> technically wrapped in it.
> > 
> > As I said, I can style the *entire* col but I don't want the first two
> > rows (whose cells do *not* have the stylename) to be styled. The whole
> > point of 'col' is to be able to deal with a particular column. There
> > ought to be a way to deal with *part* of the column.
> 
> You can style an entire column, up to some point. Only a limited
> number of properties apply tot he col element.
> http://www.w3.org/TR/CSS21/tables.html#columns (this _may_ be enough
> for your purposes though).
> 
> A combination of both might help ?

Yes, that worked. Since a row's styling overrides a col's styling I can
style the entire column and then re-style the top row.

> PS - Do you have a url of what you attempt to do ? Might be easier to give 
> advice?

At this point it's a test site so it's not really available to the
public. I'm using the codeigniter calendar class to generate a calendar
and it uses a template system that loops through each cell of a row so I
have no way to get at code within that loop..

-- 
"Private property was the original source of freedom. It still is its
 main bulwark." -- Walter Lippmann, 1937
    Rick Pasotto    r...@niof.net    http://www.niof.net
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to