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

Scott Blanchard octigonuser at hotmail.com
Fri Jan 2 13:28:36 CST 2004

I have an unordered list like so:

<li class="toplevel"><a href="default.aspx?id=1" class="navItem">About 

		<li class="toplevel"><a href="default.aspx?id=2" class="navItem">Business 
			<ul class="navMenu">
				<li><a href="default.aspx?id=22" class="navItem">Agriculture</a>
					<ul class="navMenu">
						<li><a href="default.aspx?id=3" class="navItem">Financial 
						<li><a href="default.aspx?id=4" class="navItem">General 
						<li><a href="default.aspx?id=5" class="navItem">K-12</a></li>

						<li><a href="default.aspx?id=6" class="navItem">Libraries</a></li>

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 

I thought this, but it does not work. All links are white.

li.toplevel a {color:#fff;}

li a {color:#000;}

Make your home warm and cozy this winter with tips from MSN House & Home.  

More information about the thelist mailing list