mrhello Posted May 14, 2009 Report Posted May 14, 2009 (edited) I have a nav menu using UL, LI and images. I have the inactive and the active working fine, but I just can't get the current working. As the link text is actually in the image itself, I have a specific class name for each image/link. /* inactive state */ #main_nav li a.home{ background:url(home_img.png); } #main_nav li a.about{ background:url(about_img.png); } /* hover state */ #main_nav li:hover a.home{ background:url(home_hover.png); } #main_nav li:hover a.about{ background:url(about_hover.png); } What I want is the current class to be assigned to the same as the hover. This is normally easy when each image is the same, but as all my images have the link text in them, I need to assign the "current" class to each specific class. eg class="home" OR class="home current" I have that working fine in the PHP, I just cannot get the CSS tied to the "current" with each specific class. Edited May 14, 2009 by mrhello
jlhaslip Posted May 14, 2009 Report Posted May 14, 2009 tried this yet? /* hover state */ #main_nav li:hover a.home, #main_nav li a.home.current{ background:url(home_hover.png); }
falkencreative Posted May 14, 2009 Report Posted May 14, 2009 MODERATOR'S NOTE: Please note that this post originally contained spam links (I have deleted them). With that in mind, I am not sure whether the question is valid or not.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now