Sub-menu items inheriting formatting from top level menu item

I need a top level menu item to have a border around it, but the sub-menu items to not have a border around them. At the moment they’re inheriting the border formatting.

I am using this code to get a border around the top level menu item:

#menu-item-857 span {
border: 2px solid #ffffff;
padding: 6px;
margin: -90px auto; 
}

… but this is placing a border around the sub-menu items.

Please can someone help.

The URL for the site I’m trying to achieve this on is: https://pierreosteopath.com/ … and it’s the “Book Now” menu item.

Any help would be greatly appreciated!

Hi There @cubistular

Thanks for writing in! Could you please try adding the following CSS rule also into your X -> Theme Options -> CSS area to resolve that issue.

#menu-item-857 .sub-menu span {
    border: none;
}

Hope that helps.

1 Like

That worked brilliantly - many thanks!

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.