Log in

View Full Version : drop down css problem



mlecho
02-27-2008, 05:36 PM
hi...i have made an html dropdown menu, styled with css. All works fine, except one thing: if i roll off the anchors in the <li> tags, the color of the font goes back to the off state....i would like that "over" state color to remain white, even when the mouse is on the <li>. At present, the <a> inside the <li> is inheriting it's color from the body tag (i think)..i tried applying this:


#nav ul li:hover
{
color: #fff !important;
font-size: 14px;
background-color:#fb4f14 ;
height: 15px;
padding:2px 10px 2px 10px;
}

but no luck. My html is like so:


<div id="nav">
<ul>
<li id='solutions' class='nav_item'><a href="#">SOLUTIONS</a></li>
<li id='services' class='nav_item'><a href="#">SERVICES</a></li>
<li id='clients' class='nav_item'><a href="#">CLIENTS</a></li>
<li id='societe' class='nav_item'><a href="#">SOCI&Eacute;T&Eacute;</a>
<ul id="sub_societe" class='sub'>
<li><a href="#">A PROPOS DE NOUS </a></li>
<li><a href="#">ENJEUX</a></li>
<li><a href="#">ENGAGEMENT</a></li>
<li><a href="#">INNOVATION</a></li>
<li><a href="#">ACTUALIT&Eacute;S</a></li>
<li><a href="#">CARRI&Eacute;RES</a></li>
<li><a href="#">INVESTISEURS</a></li>
<li><a href="#">PRESSE</a></li>
<li><a href="#">EQUIPE DIRIGEANTE</a></li>
</ul>
</li>
<li id="vous_etes" class='nav_item'><a href="#">Vous &Ecirc;TES</a>
<ul id="sub_vous_etes" class='sub'>
<li><a href="#">A PROPOS DE NOUS</a></li>
<li><a href="#">ENJEUX</a></li>
<li><a href="#">ENGAGEMENT</a></li>
<li><a href="#">INNOVATION</a></li>
</ul>
</li>
</ul>
</div>

for the sake of not overwhelming all of you, i will spare you all of my css unless you need more....