I have the main menu with two levels of sub menu items.
Main Menu Item
– Sub Menu level 1
– Sub Menu level 2
When sub menu item 1 or sub menu item 2 is clicked, I need the main menu items to be highlighted as if active (change to active colour). Do you know how I can achieve this?
Many Thanks
Regards
Colin
Hi waveseven!
When you click on a link in the menu it is going to load a new page and when the new page is loaded there should already be a highlight for the current page (and also it’s children).
Cheers!
Elliott
Hi Elliot
Yes when you click a sub menu link it opens a new page. I want to be able to click on the sub menu link and when the page opens the parent links of that page are the active page link colour.
Many Thanks
Regards
Colin
Hi!
Add the “.active-parent-item” selector in your css modifications:
#header .current_page_item a, #header .main_menu a:hover, .active-parent-item {
background-color: #de1a17 !important;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
color: white !important;
background-color: #BF0F13;
background-image: -webkit-gradient(linear, left top, left bottom, from(#ED161C), to(#BF0F13));
background-image: -webkit-linear-gradient(top, #ED161C, #BF0F13);
background-image: -moz-linear-gradient(top, #ED161C, #BF0F13);
background-image: -ms-linear-gradient(top, #ED161C, #BF0F13);
background-image: -o-linear-gradient(top, #ED161C, #BF0F13);
background-image: linear-gradient(to bottom, #ED161C, #BF0F13);
}
Regards,
Ismael
Hi Ismael
That is fantastic, thank you so much. You guys are brilliant !!
Many Thanks
Regards
Colin