?
Solved

keep hover over image on current menu item

Posted on 2011-10-12
6
Medium Priority
?
308 Views
Last Modified: 2012-05-12
I have a wordpress template that I am customizing for a friend of mine.  There is a superfish menu that applies a hover over image "navhov.png" to the menu on mouseover.  I wanted to keep the image on the menu item that is marked as current-menu-item in the class but I think my syntax is off as the image is not being applied.  

Any help would be appreciated.

http://www.sendright.com/draft/dial

0
Comment
Question by:gwarcher
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:SSupreme
ID: 36958602
you need image to be applied on li so use this:
#nav li:hover {
    background: url("images/navhov.png") repeat scroll right top transparent;
    color: #FFFFFF;
}
istead of this:
#nav li a:hover {
    background: url("images/navhov.png") repeat scroll right top transparent;
    color: #FFFFFF;
}
0
 
LVL 43

Accepted Solution

by:
David S. earned 2000 total points
ID: 36959017
If I understand what you want correctly, you should replace the current "#nav li a:hover" rule with this one:
#nav li a:hover,
#nav li.current-menu-item>a {
  background: url("images/navhov.png") right top;
  color: #FFF;
}

Open in new window

0
 

Author Closing Comment

by:gwarcher
ID: 36959483
worked perfectly.  Thanks!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 16

Expert Comment

by:SSupreme
ID: 36966878
So, my solution doesn't work?
0
 

Author Comment

by:gwarcher
ID: 36966881
I'm sorry, did I break protocol by not trying yours first?  I apologize for that.
0
 
LVL 16

Expert Comment

by:SSupreme
ID: 36968127
No problem, but it as about question and possible solutions, you can accept multiple solutions.
It isn't nice to ignore any effort was made.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question