- This topic has 12 replies, 3 voices, and was last updated 3 years, 2 months ago by Tom.
-
AuthorPosts
-
February 13, 2021 at 12:43 pm #1657269Aaron
Hi! I am setting up a mega menu on my site. I used your mega menu guide. It is working great so far. I am having one issue. When I hover over the menu dashicon, the text from all the submenus appears. I have my primary menu set to click only in the customizer. The menu works correctly when clicked. I’m not sure what is causing this to happen. How can I disable the submenu text on hover of the hamburger? Thanks!
February 13, 2021 at 7:42 pm #1657424LeoStaffCustomer SupportHi there,
I’m not seeing a submenu in the site you’ve linked.
Can you confirm?
February 14, 2021 at 4:35 am #1657668AaronHi! That was my mistake. I was trying to fix it myself and I turned the menu off to do some testing. It should be live now.
February 14, 2021 at 10:23 am #1658086LeoStaffCustomer SupportThat’s really strange. So does the click/hover work correctly without the mega menu CSS?
February 16, 2021 at 3:46 am #1660055AaronYeah it works fine. I even have other clients where I built the same Mega Menu for them and it doesn’t do that.
February 16, 2021 at 3:53 am #1660060AaronOne thing I noticed. Before this started happening I was having a problem where the 4 column mega menu was putting the 4th column under the 1st column. I fixed that by adding flex wrap options that I saw in another forum post.
nav .main-nav .mega-menu > ul {
position: absolute;
width: 100%;
left: 0 !important;
flex-wrap: wrap !important;
display: flex !important; }When I remove the last two flex lines, the hover issue goes away, but the 4th column drops again.
February 16, 2021 at 11:15 am #1660778TomLead DeveloperLead DeveloperHi there,
Can you try adding the latest code?: https://docs.generatepress.com/article/building-simple-mega-menu/
I’m seeing some missing parts. Then let us know and we’ll see if we can spot the issue.
Thanks!
February 17, 2021 at 4:12 am #1661531AaronHi! I replaced the code with the one on the page you linked. It looks like both issues are occurring now. The third column is dropping under the first, and the menu items show up on hover. Thank you for all of your help so far!
February 17, 2021 at 9:40 am #1662078TomLead DeveloperLead DeveloperIn the CSS you added, replace this:
display: flex;
With this:
display: flex !important;
Then, add this CSS:
@media (min-width: 769px) { nav .main-nav .mega-menu > ul > li:hover > a { color: #fff; } }
Hope this helps ๐
February 17, 2021 at 9:53 am #1662100AaronHi! That code fixed the column dropping issue. I am still seeing the menu items when I hover the hamburger icon.
February 17, 2021 at 2:47 pm #1662419TomLead DeveloperLead DeveloperAha, try replacing this:
nav .main-nav .mega-menu > ul { position: absolute; width: 100%; left: 0 !important; display: flex !important; flex-wrap: wrap; }
With this:
nav .main-nav .mega-menu > ul.toggled-on { position: absolute; width: 100%; left: 0 !important; display: flex !important; flex-wrap: wrap; }
February 18, 2021 at 3:39 am #1662952AaronYesss, thank you! I have been pulling my hair out for days trying to fix that, haha. I can code in other languages but I’m fairly new to CSS, so I am still learning my way around.
Thank you so much for the help, I really appreciate it!
February 18, 2021 at 10:45 am #1663586TomLead DeveloperLead DeveloperGlad I could help! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.