- This topic has 8 replies, 4 voices, and was last updated 5 years, 2 months ago by
Ying.
-
AuthorPosts
-
February 25, 2021 at 7:05 am #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
February 25, 2021 at 7:13 am #1672325David
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?
February 25, 2021 at 8:24 am #1672429David
StaffCustomer SupportHi 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; }February 25, 2021 at 9:18 am #1672539David
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.
February 25, 2021 at 8:33 pm #1673114Elvin
StaffCustomer SupportTry 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.
February 26, 2021 at 3:03 am #1673455David
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
February 26, 2021 at 9:13 am #1674058Ying
StaffCustomer SupportHi 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.
March 1, 2021 at 1:48 am #1676916David
Hi,
Thanks for getting back to me. I decided get rid of the menu; not worth the drama!
Thanks anyway,
Dave
March 1, 2021 at 3:20 pm #1678008Ying
StaffCustomer SupportOk then, you are welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.