Hi there,
I am using the following css in my theme to target the top level parent annd apply a background and border.
Is it possible to target the css to change the colours if no parent is found ie we are at the top level?
#wp-widget-advanced_sidebar_menu-wrap .parent-sidebar-menu > li > a {
background-color: red !important;
border-bottom:1px solid rgba(0,158,222,.2);
}
Dion Bairle
Further to this is it possible to apply hover to the top level item only?
OnPoint Plugins
Good morning Dion,
You may target the top level parent when you are on the top level by adding the
.current_page_item
class to the CSS like so.You may add a hover effect to the top level parent by adding
:hover
to yourli
selector.If you would like to add a hover effect to the top level parent when you are on the top level by combining both techniques.
Have a great rest of your weekend!