Jump to content

Archived

This topic is now archived and is closed to further replies.

bobbekaer

Menu showing the selected page

Recommended Posts

bobbekaer    0
bobbekaer

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
Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
bobbekaer    0
bobbekaer

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

 

Thank you!!!!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

no problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • monkbait
      By monkbait
      Website URL: http://isaac.2acrestudios.com/about-us/who-is-isaac/
      Framework Version: 2.4.4
      WordPress Version: 3.6
       
      I cannot seem to find a way to set the background color for the Secondary Nav section.
       
      I can see that #secondnav section has a dynamic height value in the DOM. But, .texture, .content and .content-pad are somehow all set to 10px?
       
      If I hard set a height in CSS, it only works while the layout is full width. When I shrink the screen down to tablet or phone sized, the gap shows up again.
        In all the other sections (header, content, footer), the .texture block gets set to the same height as the section tag. Secondary Nav does not seem to do that?    
    • wavel3ngth_pl_login
      By wavel3ngth_pl_login
      I am building a new site using PageLines, and will have a main nav, which I plan on using the NavBar.   I also have a few landing pages which are separate from the website pages, but still live within the WordPress and the PageLines theme.  I want to have a NavBar which would just have one link back to the Main Site and I want it to look exactly like the main website NavBar.   Can this be done and if so, how?  I have been banging my head on this for a while now.
       
    • nfp1900
      By nfp1900
      Hi
       
      In the PL template I have assigned a Secondary Nav to the header which is adjusted to float right. I've assigned a WP menu in the Theme Locations section of Wordpress under simple-nav.
       
      However, PL doesn't populate the secondary nav with a menu choice for a new page until I choose it from the meta settings. Am I missing a trick for a default secondary nav menu to be selected for every page that is created?
       
      It's the one top right in this example:
      http://testserver.nicholaspealldesign.com/
       
      Thanks
       
      PS forgot to say that the navbar option COULD work if only there was a way of stripping out the colour option and making it nice and simple? Looks like the options are coded into the PL theme.
    • julius
      By julius
      Secondary Nav is great -
      its the only Nav that lets me assign (header-)Menu's individually for each page !!
       
      BUT its not mobile friendly
      (if I resize the browser, menue points jump to second row...)
       
      Maybe has anyone a solution to turn secondary Nav in a "mobile friendly menu" ?
      (or how to make the mobile menu plugin work with secondary Nav?)
      ????
       
      That would be awesome!
      Cheers
      Julius
    • Ben_
      By Ben_
      Hey,
       
      I have been using the secondary nav to show the child pages which has been great. My only concern is that I am not able to apply Certain CSS values to it. I have tried
       
      #secondnav
          {
          display:block;
          width:60px;
           }
       
      to make it vertical to no avail, and some of the postioning atributes are not applying. I may be useing the wrong Base theme, but when I outline it I can tell that is the one I want to use. I am assuming it is within the footer and has other attributes applied to it that are not in the #secondnav theme. I am new to this so  any help would be much appreciated!
       
      B
×