Site logo

[Resolved] Sub menu items not showing

Home Forums Support [Resolved] Sub menu items not showing

Home Forums Support Sub menu items not showing

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1672309
    David

    Hi,

    I’ve spent a fair while looking through GP documentation and I can’t figure this one out…

    I’ve moved my secondary nav to the footer bar, which worked. But the menu items won’t display their sub-menus.

    The sub-menu items are definitely set up correctly in menus; I’ve got the exact same menu setup on a different GP site (in the primary nav in the header) and it works fine.

    The only other thing I call tell you is that in the source code, there is no mention of <ul class=”sub-menu”> which I know should be there. So it seems the sub menu is actually missing, not just invisible.

    I’ll attach site details and login.

    Cheers,

    Dave

    #1672325
    David

    Update – I just tried reinstating the header, then adding the secondary nav into it, and it DID display the sub menu items. So it looks like the problem lies in the fact that the menu is being used in the footer?

    #1672429
    David
    Staff
    Customer Support

    Hi there,

    i can only see a navigation in the footer widgets – is that the one?
    If so you will need some CSS to display the Sub Menu as they’re hidden by default.

    .footer-bar .widget_nav_menu li ul {
        display: block;
    }
    #1672539
    David

    That is the menu in question, and your CSS has made the sub-menu appear, thanks

    The only problem now is, the sub-menu items are showing by default, and it looks like they are stacked underneath the main menu, instead of expanding out if it.

    #1673114
    Elvin
    Staff
    Customer Support

    Try adding modifying David’s code into this:

    .footer-bar .widget_nav_menu li:hover ul {
        display: block;
        position: absolute;
        left: 0;
    }

    So the submenu only shows when you hover the parent menu item.

    #1673455
    David

    Thanks very much Elvin, that’s taken me a step closer.

    The sub-menu items now appear.

    I’ve also added some of Tom’s code from https://generatepress.com/forums/topic/drop-down-menu-in-widget/#post-167852

    top: auto;
    bottom: 40px;

    So it is now a drop-up menu.

    The remaining problems are:

    a) as soon as you stop hovering over the parent menu item, the sub menu disappears, so it isn’t possible to select anything.

    b) the texts of the sub-menu items are offset from each other, and text-align:left seems to make it worse

    #1674058
    Ying
    Staff
    Customer Support

    Hi David,

    Are we here still talking about the menu in footer?
    As when I inspect your site, there’s no sub menu of the menu in footer, have you changed its structure?

    Let me know.

    #1676916
    David

    Hi,

    Thanks for getting back to me. I decided get rid of the menu; not worth the drama!

    Thanks anyway,

    Dave

    #1678008
    Ying
    Staff
    Customer Support

    Ok then, you are welcome 🙂

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