Re: [CSS3] nth-child pseudo class

On Sat, 5 Feb 2005, Andrew Fedoniouk wrote:
> 
> As stated [1]
> "The :nth-child(an+b) pseudo-class notation represents an 
> element that has an+b-1 siblings before it "
> 
> Question is: does this apply to the root element?
> For example if <html> is a root then shall selector
> 
> html:nth-child(1) { overflow:auto }
> 
> match <html> element?

I was going to answer that yes, it did, but that :first-child didn't, but 
then I noticed that :first-child is defined as being equivalent to 
:nth-child(1), so that is a bit of an issue.

I would therefore assume that :nth-child() does _not_ match elements 
without parent nodes, but the spec should indeed be updated.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 7 February 2005 14:03:04 UTC