Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Highlight menu item in 2nd level


  #1  
Old Mar 17, 2014, 08:05 AM
freelancekonsulenten's Avatar
freelancekonsulenten
 
45 posts · Oct 2009
Denmark
I have this page: http://www.nemkontoret.dk/ny/ where I have been trying to highlight the active menu item.
If i go to a 1st level menu item where there is 2nd level menu items, it will highlight all the 2nd level menu items.

How can I stop that?

Thank you!!
__________________
WordPress blogs og hjemmesider og webshops

Last edited by lmilesw; Mar 17, 2014 at 09:01 AM.
  #2  
Old Mar 17, 2014, 09:06 AM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
First of all "active" in css refers to the item when it is clicked on (mouse button down) and does not refer to it's status as current. You need to use a tool like Firebug on Firefox to determine the CSS selector for the current state and write some CSS to set the background etc to whatever color you wish.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Mar 17, 2014, 09:30 AM
freelancekonsulenten's Avatar
freelancekonsulenten
 
45 posts · Oct 2009
Denmark
I have tried to do so, but can't figure out why 2nd level menues are highlighted when I click on a 1 st level menu item.

The CSS i have found is this: li.current-menu-item a

It works fine if there is no 2nd level menu item
__________________
WordPress blogs og hjemmesider og webshops
  #4  
Old Mar 17, 2014, 11:18 AM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
Now you have to write some code for the sub-menus if you don't want them to be highlighted.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #5  
Old Mar 17, 2014, 01:01 PM
freelancekonsulenten's Avatar
freelancekonsulenten
 
45 posts · Oct 2009
Denmark
How to do that??

It is working like I want when I am standing on a submenu item.
I just don't want 2nd level to be highlighted when standing on a 1st level item.

Everything else is working perfect.
__________________
WordPress blogs og hjemmesider og webshops
  #6  
Old Mar 18, 2014, 10:10 AM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
Without knowing more about what you have done this is not a simple "here is the code". I would need to install the menu plugin you are using and spend time seeing how to tweak the colors. Then I would need to know what you have already done for styling on your site. Also perhaps the menu plugin creator has some thoughts on styling.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #7  
Old Mar 19, 2014, 02:04 PM
freelancekonsulenten's Avatar
freelancekonsulenten
 
45 posts · Oct 2009
Denmark
I have disabled the menu plugin, as this just was something I tried, in order to try to find the problem :-)
It is the same problem just with the standard menu widget.

Here is the code I have used so far:

div.widget ul li a:visited, div.widget ul li a:active, div.widget ul li a:hover {
background: #88a360;
border-radius: 10px;
padding: 5px;
margin-left: -5px;
}

li.current-menu-item a {
border-radius: 10px;
padding: 5px;
margin-left: -5px;
background: #88a360;
}
__________________
WordPress blogs og hjemmesider og webshops
  #8  
Old Mar 19, 2014, 04:29 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
Because of the cascading of CSS you have to, as I said, write more CSS to style the sub menus as you want. This can take a bit of "fiddling"
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] highlight current menu item w/out highlighting children if parent is selecte tnandrick Page & Category Menu Bars 6 Nov 9, 2013 09:24 AM
[SOLVED] How to highlight first menu item? beyondelsewhere Page & Category Menu Bars 2 Aug 22, 2013 05:24 PM
Menu 1 Settings not Displaying on Top Level Menu Item using WP3 Menus fantasychess Page & Category Menu Bars 2 Jan 7, 2011 03:25 PM
Top Level Menu highlight when sub-menu page is displaying? brianlees Page & Category Menu Bars 0 Jan 18, 2010 04:38 PM


All times are GMT -6. The time now is 02:08 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.