Site logo

[Resolved] How to fix Sub menu not showing when mouse is out of menu

Home Forums Support [Resolved] How to fix Sub menu not showing when mouse is out of menu

Home Forums Support How to fix Sub menu not showing when mouse is out of menu

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1876138
    SEO

    Hey guys, I want to add some margins on my submenus whenever I hover my mouse, this is the csss that I added. However upon adding this css whenever my mouse move towards the sub menu, the sub menu will go hide. here is my site

    https://hrcstaging.wpengine.com/

    .main-navigation:not(.toggled) ul li.sfHover>ul, .main-navigation:not(.toggled) ul li:hover>ul {
    margin-top: 20px;
    }

    #1876146
    SEO

    here is what I want to accomplish in my sub menu gap

    https://www.harmonyrecoverync.com/

    if you notice there is a slight gap on primary menu and sub menu

    #1876151
    Leo
    Staff
    Customer Support
    #1876220
    SEO

    its not working

    #1876237
    Ying
    Staff
    Customer Support

    I just tested the code on your site in the developer tool, it’s working.

    After adding the code, have you cleared the cache?

    #1876247
    SEO

    this is the image of what I want to copy, I want to have a gap on my primary menu and sub menu
    copy site

    #1876300
    Ying
    Staff
    Customer Support
    #1877062
    SEO

    No I removed it

    #1877528
    David
    Staff
    Customer Support

    Can you add the CSS back in, leave it there, so we can take a look at whats happening.

    #1877554
    SEO

    I put back the css and it seems working. However when you hover on the submenus it is changing position. is there a solution for this?

    #1877645
    Ying
    Staff
    Customer Support

    Trt change this CSS

    .main-navigation:not(.toggled) ul li.sfHover>ul, .main-navigation:not(.toggled) ul li:hover>ul {
        margin-top: 20px;
    }

    to this:

    .main-navigation:not(.toggled) .main-nav > ul > li.sfHover>ul, .main-navigation:not(.toggled) .main-nav > ul > li:Hover>ul {
        margin-top: 20px;
    }
    #1877660
    SEO

    Perfect thank you ying its working now the way it should be

    #1877691
    Ying
    Staff
    Customer Support

    Great! Glad to hear that 🙂

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