Archived topic
Targeting Only the Sub-Menu
3 replies · Started by Cori on January 15, 2019
Viewing posts 1–4 of 4
Hello, I used this CSS to add a custom separator to the nav menu:
.main-navigation .main-nav ul li a:before {
content: "/ ";
color: #C23631;
}
How do I exclude the submenu? I don't want the "/" character to show there.
Thanks in advance!
Hi there,
Try this:
.main-navigation .main-nav > ul > li > a:before {
content: "/ ";
color: #C23631;
}
More info here: https://www.w3schools.com/cssref/sel_element_gt.asp
That worked perfectly. Thanks a bunch!
No problem :)
This archived topic is closed to new replies.