Archived topic
CSS Primary menu line separator on dropdown after 2nd menu item
3 replies · Started by jr on May 18, 2021
Viewing posts 1–4 of 4
Hello,
How can a line separator be added to the primary menu as shown in #3 in this image?
thank you
Hi JR,
Give this CSS a try:
.main-navigation .main-nav ul li.menu-item-has-children ul li a {
border-bottom: 1px solid #515151;
}
Hi,
That code adds the separator to every item child menu item.
How can it be added only after the 2nd and 3rd menu item like the image example?
thank you
Sorry misread your question.
Try this instead to add bottom border to 2nd and 3rd menu item:
.main-navigation .main-nav ul li.menu-item-has-children ul li:nth-child(2) a, .main-navigation .main-nav ul li.menu-item-has-children ul li:nth-child(3) a {
border-bottom: 1px solid #515151;
}
This archived topic is closed to new replies.