Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

cant get color change on dropdown CSS

cant get color change on dropdown CSS

Problem

I want to change the Color of the menu once the user selects it. I want the Year,Class, Subject menu item to change to blue once the user rollover it and remain blue while the user navigate through its dropdown. im propbably doing something really stupid.

HTML

CSS

#nav { 
font-size:14px; 
color:#fff;
margin:2px; 
padding:0px; 
position:absolute; 
top:8px;
left:25px;
font-weight:bold;
z-index:400;

}
#nav a.active {
    color:#000;
}

#nav > li {
 font-weight:normal;
list-style-type:none; 
float:left; 
display:block; 
margin:0px 0px;
color:#000;
position:relative; 
padding:10px; 
width:190px;

}
#nav > li:hover ul {
 display:block; 
color:#000;
 }
#nav > li:hover  { 
background-color:#fff;
-moz-border-radius:10px; 
-webkit-border-radius:10px;
border-radius:10px; 
color:#000;
-moz-box-shadow:0 1px 1px #777;
-webkit-box-shadow:0 1px 1px #777;
box-shadow:0 1px 1px #777;
color:#000;
}

#nav li ul {
font-size:11px;
 margin:0px; 
padding:0px; 
display:none;
color:#000;}

#nav li ul li {
font-size:10px; 
list-style-type:
none; 
margin:0px 0 0 0;
color:#000;
}
#nav li ul li a { 

font-size:10px;
display:block; 
padding:5px 10px; 
color:#000; 
text-decoration:none;
}

#nav li ul li:hover a { background-color:#ccc; 
-moz-border-radius:5px;
 -webkit-border-radius:5px;
border-radius:5px;
}
#nav li span { 
cursor:pointer;
margin:0px 10px;
color:#000; 
}
Problem courtesy of: user1179851

Solution

You haven't defined "a:active" anywhere. Try adding that in.

Solution courtesy of: moettinger

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

cant get color change on dropdown CSS

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×