[thelist] contextual selector with class filter does not work?

Joshua Olson joshua at waetech.com
Fri Jan 2 13:39:43 CST 2004


----- Original Message ----- 
From: "Scott Blanchard" <octigonuser at hotmail.com>
Sent: Friday, January 02, 2004 2:28 PM


> The problem is that I want all links whose immediate parent belongs to the
> "toplevel" class to be white. All other links, including those nested
under
> the toplevel class, should be black.. What is the proper css to make that
> happen?

Child selectors are what you are looking for:

http://www.w3.org/TR/CSS2/selector.html#child-selectors

Browser support is splotchy though.  There are a couple other options:

1.  If you can promise that all possible links below a toplevel LI are
within their own UL, then you could define the following:

li.toplevel ul a {color:#fff;}

2. Override the color declaration in the navMenu class.  Make sure the
navMenu class is defined AFTER the toplevel class.

Best of luck,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/MN/
706.210.0168



More information about the thelist mailing list