Site logo

[Resolved] Targeting Only the Sub-Menu

Home Forums Support [Resolved] Targeting Only the Sub-Menu

Home Forums Support Targeting Only the Sub-Menu

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #782732
    Cori

    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!

    #782843
    Leo
    Staff
    Customer Support

    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

    #782875
    Cori

    That worked perfectly. Thanks a bunch!

    #783009
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.