Solved

Css Dropdown Menus

Posted on 2014-07-22
4
253 Views
Last Modified: 2014-07-22
I have a wordpress website with a dropdown menu.  I'm using CSS to style the background on Hover.  However, Menu choices that do not have a dropdown menu, I don't want there to be any background on hover.  Also, my dropdown menu is inheriting attributes that I don't want there.  If you go here: http://spokeinsurance.com/spoke/ and go toi the menu it should make sense.  But for further info, go to ABOUT and then down to "who we are" and you will see the styling I don't want.  Then if you go to FAQ, there is a background on hover that I don't want there cause there is no dropdown menu.

Any help?
0
Comment
Question by:rgranlund
4 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40212883
styles.css line 2449
Change
.top-menu li:hover

to
.top-menu .menu > li:hover:nth-child(n+3)
0
 
LVL 28

Expert Comment

by:chilternPC
ID: 40212885
not sure what you mean.
on safari it looks ok.
the way I see  menus are as buttons and buttons when clicked will do something and buttons usually have a hover over and change to indicate you have got the right button.  is it just the  actual change you don't like?  
I think its slightly too big when you hover and would just go for the change in colour,
0
 
LVL 7

Author Closing Comment

by:rgranlund
ID: 40212925
Yep, never would have come up with that.  Thanks!
0
 
LVL 15

Expert Comment

by:eemit
ID: 40212972
You can also use class menu-item-has-children added by WordPress, e.g:
.top-menu li.menu-item-has-children:hover {
    box-shadow: 0 -3px 8px -5px black;
}

.top-menu li:hover {
    box-shadow: none;
}

Open in new window


Please note: If you have less than three sub-menu items posted solution will not work.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The viewer will learn how to count occurrences of each item in an array.

770 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