View Single Post
Old 12-13-2012, 03:09 PM   PM User | #1
huhnej31
New to the CF scene

 
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
huhnej31 is an unknown quantity at this point
Navigation Menu: a:hover styling works, a.selected does not

Hello,

I have a simple navigation bar that I would like to change color over hover and remain that color when selected. The a:hover works great but the a.selected does not (even though the class="selected" does work for each individual page) This is how I have the list set up:

Code:
<ul id="kids_nav">
<li><a class="selected'" id="maggie" href="http://asdf.com">Maggie</a></li>
<li><a class="" id="dijon" href="http://agsdf.com">Dijon</a></li>
<li><a class="" id="brandon"href="http://asdsdf.com">Brandon</a> </li>
<li><a class="" id=""href="asdfg.com">Behind The Scenes</a></li>
</ul>
And here is most of my CSS so you can get the idea...

Code:
#kids_nav li a{
	
	font-size: 1.5em;
	font-weight: bold;
	color: #373737;
	padding: 5px;
	padding-left: 15px;
	padding-right: 15px;
}
#kids_nav li a#dijon{
	color: #00763f;
}

#kids_nav li a#dijon:hover, #kids_nav li a#dijon.selected{
	background-color: #00763f;
	color: #fff;
}

#kids_nav li a#brandon{
	color: #CD5400;
}

#kids_nav li a#brandon:hover, #kids_nav li a#brandon.selected{
	background-color: #CD5400;
	color: #fff;
}
Any advice would be great! Like I said, the class=selected works on all of the pages, the hover works, but I just cant get the items to remain highlighted. Thank you in advance!
huhnej31 is offline   Reply With Quote