mrhello Posted May 14, 2009 Report Share 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 Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted May 14, 2009 Report Share 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); } Quote Link to comment Share on other sites More sharing options...
falkencreative Posted May 14, 2009 Report Share 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.