WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Navigation link highlight (5 posts)

  1. chocula
    Member
    Posted 1 year ago #

    I have a menu structure like this:

    Work
     - item name
        - item detail
        - item detail 2

    What i want is the for the top menu navigation to always be highlighted. Currently when you are on the item name page work is highlighted but when you go in to the item detail page the work stops being highlighted.

    Is there any way to do this?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Yes CSS can achieve this.

    Can you provide a link to your website, or Pastebin.com the HTML and CSS of one page?

  3. chocula
    Member
    Posted 1 year ago #

    Hey,

    here is a link to the site http://www.headspacedance.com. There are currently only sub, sub pages on the work section.

    Thank you

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    wp_nav_menu() outputs a range of css classes;
    http://codex.wordpress.org/Function_Reference/wp_nav_menu#Menu_Item_CSS_Classes

    try to work with a browser tool such as Firebug http://getfirebug.com/ to identify the css selectors of the 'work' tab when one of the child-child-pages is selected.

  5. chocula
    Member
    Posted 1 year ago #

    following on from your suggestions i added this code to the css

    #access .current-page-ancestor > a {
    	font-weight: normal;
    	color: #FFFFFF;
    }

    which has achieved the desired effect. thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.