[Resolved] How to add underline on main menu when the item is active?

Home Forums Support [Resolved] How to add underline on main menu when the item is active?

Home Forums Support How to add underline on main menu when the item is active?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1462592
    Gabriela

    How to add underline on main menu when the item is active?

    #1462598
    Leo
    Staff
    Customer Support

    Hi there,

    There isn’t underline added by default so I’d assume you’ve added some CSS for it.

    I’d need to see the site in question to be able to help.

    #1462743
    Gabriela

    I updated the question

    #1462745
    Leo
    Staff
    Customer Support

    Try this CSS:

    .main-navigation .main-nav ul li[class*="current-menu-"] > a {
        text-decoration: underline;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #1462746
    Gabriela

    Now, how do I remove it from the submenu?

    #1462749
    Leo
    Staff
    Customer Support

    Try this instead:

    .main-navigation .main-nav > ul > li[class*="current-menu-"] > a {
        text-decoration: underline;
    }
    #1462752
    Gabriela

    Thank you!!!!

    #1462754
    Leo
    Staff
    Customer Support

    No problem 🙂

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