.main-navigation .menu > li > a {
border-right: 2px solid #000000;
}
.main-navigation .menu > li:last-child > a {
border-right: 0;
}
I’m using the above code to add separators to my navigation menu. It does work….. However, the “last-child” bit doesn’t and the last item on my menu still has a border to the right.
ahh I believe the search icon is being treated as the last menu item which is why it looks like it’s not working.
I assume you are not finished adding menu items yet? Once you are done I can provide CSS to target the last (or second last in this case) menu item and take away the border.
For now I’ve put the search in the “Top Bar”. However, I would like to obtain the CSS for future reference if I decide to move the search back to the nav-bar.
.main-navigation .menu .menu-item-## > a {
border-right: 0;
}
You would need to replace ## with the unique menu item ID number. You can find it by using Chrome, right click on the last menu item and select Inspect.
So for your current navigation, the Apps item has ID of 31.