Archived topic
Mega Menu
3 replies · Started by S on December 6, 2020
Hello,
We're trying out the simple Mega Menu CSS shown here: https://docs.generatepress.com/article/building-simple-mega-menu/,
It works pretty well when the page is scrolled to the bottom once once you scroll down and the menu stays at the top, the mega menu changes to the full width. Would like it to be constrained like it is when the page is at the top.
Sort of the opposite of this thread (they wanted full width at all times).
https://generatepress.com/forums/topic/set-up-mega-menu-width/
Any ideas?
Hi,
Try adding this CSS:
nav#sticky-navigation ul#menu-mainmenu {
position: relative;
}
This should constrain the absolute positioned sub-menus to the navbar width.
Awesome!
I believe this is resolved? Feel free to open up a new topic if you need further help. :)