POV-Ray : Newsgroups : povray.off-topic : CSS can be fun : Re: CSS can be fun Server Time
4 Sep 2024 01:20:26 EDT (-0400)
  Re: CSS can be fun  
From: Phil Cook v2
Date: 22 Sep 2010 06:08:57
Message: <op.vjfihcaxmn4jds@phils>
And lo On Wed, 22 Sep 2010 11:00:07 +0100, Invisible <voi### [at] devnull> did  
spake thusly:

>>> I'm still waiting for the day when you can take an ordinary <table>
>>> element with no special markup, and style is so that each row as an
>>> alternating background colour. :-P
>>>
>>> (Currently the only way to do this is to assign different style
>>> classes to each row.)
>>
>> Off the top of my head I don't know which browsers support :nth-child(),
>> but I'm betting the latest releases of IE don't. Tum te tum oh yes what
>> a surprise it doesn't; the latest versions of Firefox do though so you
>> can use it if you want.
>
> I hadn't even heard about :nth-child. (What, still no :last-child yet?)  
> That still doesn't help me style a table with some arbitrary number of  
> rows, where I want the odd rows blue and the even rows yellow.

We're cross-threading here so I'll just repeat tr:nth-child(odd){} Oh and  
nth-last-child() will select elements backwards, but besides there is a  
:last-child. All hail CSS3.

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.