[Resolved] Submenu positioning

Home Forums Support [Resolved] Submenu positioning

Home Forums Support Submenu positioning

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1576829
    Nick

    In desktop screen widths, is it possible to have the submenu appear 10px lower when it expands?

    See website link and picture below.

    Thanks!

    #1576916
    Ying
    Staff
    Customer Support

    Hi Nick,

    Yes it’s possible, here’s the css:

    @media (min-width: 769px) {
        .main-navigation ul.sub-menu {
            margin-top: 10px;
        }
    }

    But by lowering the submenu the Hover dropdown option won’t work well.
    It’s better to change it from Hover to Click – Menu Item in customizer.

    Let me know ๐Ÿ™‚

    #1577159
    Nick

    Cheers Ying – yes I see your point there. Would it be possible to increase the clickable area in CSS of the sub-menu to make it more forgiving and stop it closing as quickly when you move the mouse pointer down? I’ve seen it done on buttons before etc..

    #1577353
    David
    Staff
    Customer Support

    Hi there,

    try this CSS instead:

    .main-navigation .main-nav ul li a,
    .site-logo {
        margin-bottom: 10px;
    }
    #1577564
    Nick

    thanks David – Doesn’t seem to work there….indeed isn’t the new code adjusting the site-logo? Am trying to stop the sub-menu closing when you move the mouse cursor down from the “About” menu option into the sub-menu (given we now have put a gap between the primary menu bar and the sub-menu block) – see website link.

    #1577781
    Ying
    Staff
    Customer Support

    Hi Nick,

    Make sure that you replace the css I provided previously:

    @media (min-width: 769px) {
        .main-navigation ul.sub-menu {
            margin-top: 10px;
        }
    }

    with this set of new css.

    @media (min-width: 769px) {
        .main-navigation .main-nav ul li a, .site-logo {
            margin-bottom: 10px;
        }
    }

    Let me know ๐Ÿ™‚

    #1577791
    Nick

    Thank Ying – yep I replaced (you can see the new version live now). This new css just seems to make the primary menu bar taller (and the gap between the primary menu bar and the sub menu we wanted has disappeared).

    #1577943
    David
    Staff
    Customer Support

    Try this CSS instead of all the others:

    @media(min-width: 769px) {
        .main-navigation .main-nav ul li.menu-item-has-children:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 70px; /* height of nav plus space below */
        }
    
        .main-navigation .main-nav ul ul {
            margin-top: 10px;
        }
    }
    #1577955
    Nick

    thanks David / Ying – that works perfectly. Appreciated.

    #1578006
    David
    Staff
    Customer Support

    Glad we could be of help

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