[thelist] CSS selectors
Marcus Andersson
marcus at bristav.se
Thu May 27 14:34:45 CDT 2004
The problem is that I have
<div class="nodeContainer node last">...</div>
on other places in the hierarchy and possibly on the same level.
So I have to match on both or I will screw the other one up.
/Marcus
David Bindel wrote:
> On Thu, 2004-05-27 at 14:14, Marcus Andersson wrote:
>
>>Say I have a div like
>>
>> <div class="nodeContainer leaf">...</div>
>>
>>and another div like
>>
>><div class="nodeContainer leaf last">...</div>
>
> ...
>
>>/* The following selector is wrong but I wonder how I can (if possible) do it */
>>div.tree div.leaf&&last {
>> styling stuff that overrides a couple of properties
>>}
>>
>>Is it possible? How do I do? Or do I have to add more elements to express what I want?
>
>
> Why not just use the selector "div.tree div.last"? As long as you can
> ensure that the last leaf is the only element of class "last" inside of
> a div of class "tree".
>
> Are there elements besides last leaves that use the class "last"? If
> so, you could always change the class name to "lastleaf" or something
> like that so they do not get confused.
>
> HTH,
> David Bindel
>
> http://www.davidbindel.com
>
More information about the thelist
mailing list