There is a :last-node too, and AFAICT they are only used in Quirks Mode
(currently the rules are in quirks.css).
- marc
Ian Hickson wrote:
> On Thu, 8 Mar 2001, Code Junkee wrote:
>
>> I noticed the html.css file (which I assume is the default style sheet
>> mozilla renders with) has a couple style sheet attributes i'm not too
>> familiar with. If anyone can provide some insight as to what they mean or
>> direct me to some documentation (aside from w3c since it doesnt seems to be
>> any sort of css standard)...
>>
>> Specifically, this is what i'm referring to:
>>
>> body > *:first-node, td > *:first-node {
>> margin-top: 0;
>> }
>>
>> what does the "> *:first-node" mean? i know css2 has a ":first-child"
>> property but couldnt find anything on "first-node" or the syntax of this
>> context.
>
>
> :first-node is a mozilla extension that escaped the "-moz-" prefixing. It
> matches the first child of an element (like :first-child) but only if
> there is no non-white-space textual content before it.
>
> For example, it matches the <green> elements below but not the <red> ones:
>
> <green>
> <green/>
> <red/>
> <red/>
> </green>
> <red>
> <green/>
> </red>
> <red>
> Hello
> <red/>
> </red>
>
> HTH,