[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 
Us</a></li>

		<li class="toplevel"><a href="default.aspx?id=2" class="navItem">Business 
Services</a>
			<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 
Assistance</a></li>
						<li><a href="default.aspx?id=4" class="navItem">General 
Information</a></li>
						<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>
					</ul>
				</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 
happen?

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.  
http://special.msn.com/home/warmhome.armx



More information about the thelist mailing list