Jump to content


Photo
- - - - -

Menu showing the selected page

secondary nav

Best Answer Danny , 22 October 2013 - 12:18 PM

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.wordpre...tem_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.

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 bobbekaer

bobbekaer

    Advanced Member

  • Members

  • 89 posts
  • Framework Version:2.3.6
  • Country: Country Flag

Posted 22 October 2013 - 12:02 PM

Hi

 

I am using the secondary navigation on this page: 

Please Login or Register to see this Hidden Content

 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

Please Login or Register to see this Hidden Content

 

 



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 15084 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 22 October 2013 - 12:18 PM   Best Answer

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.

 

Please Login or Register to see this Hidden Content

 

For example:

 

Please Login or Register to see this Hidden Content

 

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.



#3 bobbekaer

bobbekaer

    Advanced Member

  • Members

  • 89 posts
  • Framework Version:2.3.6
  • Country: Country Flag

Posted 22 October 2013 - 12:32 PM

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

 

Thank you!!!!



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 15084 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 22 October 2013 - 01:23 PM

no problem.







Also tagged with one or more of these keywords: secondary nav