Search code examples
csswordpressmenusubmenu

Wordpress 1st. level and sub level menu


I have designed a WP website, and I have put the navigation in a widget area on the left side. That's all good.

The navigation shows all 1st. level and sub level menu. That's all good too.

The problem is, when I click/activate a 1st. level menu. All the sub level menus for that 1st. level are automaticaly highlighted. Any ideas on how to remove the submenu highlight, when I click the parrent 1st. level menu?

The website is build with Headway.

See the website here: http://gaarde.cashosting.dk/


Solution

  • Your CSS rule for each of the submenu items is

    #block-bis5492b161af3aa ul li.current_page_item a
    

    Which is applying the blue colour, and will make every child item of li.current_page_item blue.

    Just insert > between li.current_page_item and a - this will only apply to the first child element.

    So you'll have as your CSS rule:

    #block-bis5492b161af3aa ul li.current_page_item > a