[Support request] Underline menu

Home Forums Support [Support request] Underline menu

Home Forums Support Underline menu

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #996097
    Antal

    Hi guys,
    I have added an underline on the main menu. But now I am struggling to delete this underline from the dropdown menu items. Hope you can help me with this?

    .main-navigation .main-nav ul li[class*="current-menu-"] > a:after, 
    .main-navigation .main-nav ul li:hover > a:after, 
    .main-navigation .main-nav ul li.sfHover:hover > a:after {
        content: "";
        display: block;
        width: 100%;
        border-bottom: 1.5px solid #ef5c1c;
        position: relative;
        top: -30px;
        opacity: 1;
    }

    Thanks a million! (I feel rather stupid not knowing CSS well πŸ˜‰ )

    #996146
    David
    Staff
    Customer Support

    Hi there,

    you can use the > Child Combinator in your CSS.
    So change:

    .main-nav ul to .main-nav > ul

    then the CSS will only apply to UL’s that are a direct child of the main nav.

    #996190
    Antal

    Hello David,
    I have changed the CSS to

    .main-navigation .main-nav > ul li[class*="current-menu-"] > a:after, 
    .main-navigation .main-nav > ul li:hover > a:after, 
    .main-navigation .main-nav > ul li.sfHover:hover > a:after {
        content: "";
        display: block;
        width: 100%;
        border-bottom: 1.5px solid #ef5c1c;
        position: relative;
        top: -30px;
        opacity: 1;
    }

    But it is still the same?
    The site I am working on is in maintenance mode, how can I send you the log in date so you can have a look?

    #996198
    David
    Staff
    Customer Support

    Sorry hadn’t had my midday coffee lol

    Try updating the selectors:

    .main-nav > ul li to .main-nav > ul > li

    #996199
    Antal

    Yes, that did it. Thanks a lot Dave. πŸ™‚
    Enjoy your coffee πŸ˜‰

    #996200
    David
    Staff
    Customer Support

    Having one of those weeks lol – glad to hear its working.

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