• 0
Sign in to follow this  
Followers 0

Menu showing the selected page


Question

Posted · Report post

Hi

 

I am using the secondary navigation on this page: http://plo-frederiksberg.dk/ Using this CSS I would like the menu-item to turn #539baa when a page is selected. I can see the a:active is just for the "action of clicking".

 

Looking at the main.nav I tried the a:focus but that made no difference?

 

:-)

Bolette

.menu-separator {
	border-left: 1px solid #539baa;
	font-size: 16px !important;		
}


#secondnav ul li a {
    color: #323232 !important;
}

#secondnav ul li a:hover {
    color: #539baa !important;
}

#secondnav ul li a:active {
    color: #539baa!important;
} 

 

 

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi,

 

You will need to use the Wordpress menu class such as current-menu-item etc... These are visible in the menus classes, you will need to inspect the menu item to get the class.

 

http://codex.wordpress.org/Function_Reference/wp_nav_menu#Menu_Item_CSS_Classes

 

For example:

 

#secondnav ul li.current-menu-item a { }

 

However, you will need to remove the !important declaration you have on your current code, as this will override it and also, you shouldn't need to use !important.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Solved :-) I cleaned up and added the current-menu-item.

 

Thank you!!!!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

no problem.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0