[thelist] CSS selectors
Marcus Andersson
marcus at bristav.se
Thu May 27 14:38:33 CDT 2004
You can see an example on http://mweb.se/tree/gen_tree.html
If you have IE6 or Moz you can also see the XML version at http://mweb.se/tree/tree.xml
The html code is pretty crappy indented since it's generated from XSLT. I don't want the left border on the
last leaf node on each subtree. I can introduce more elements in the hierarchy but it would be nicer if didn't
have to.
/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