Using Max Mega Menu Pro it is possible to make your menus stick to the top of the page as the user scrolls down.
Making a menu sticky
To make a menu stick to the top of the page when the user scrolls down, go to Appearance > Menus.
Select the menu you’d like to become sticky and enable the “Sticky” option.
Sticky Menu Settings
Stick on mobile
This setting will enable or disable the menu from being ‘stuck’ on mobiles.
If you have a menu with a large sub menu it is possible the menu could fill the screen. In this instance the user could become ‘trapped’ on the menu without being able to scroll past it. For this reason the sticky behaviour is automatically disabled on mobile devices.
If you enable the “Sticky on mobile” option then you must sure that at no point the menu can become taller than the screen size. To do this you can use the ‘Hide on mobile’ or ‘Hide sub menu on mobile’ option for each menu item (within the mega menu settings) to reduce the height of your menu.
Set the opacity (transparency) of the menu when it’s sticky. 1 is full opaque, 0 is fully transparent.
If you enable multiple sticky menus, or have other sticky elements on your site, you can use this option to make sure they do not stack on top of each other.
By default the menu background will expand to fill the whole width of the browser when the menu becomes sticky. If you are, for example, making an accordion menu sticky (where the content to the left or right of the menu needs to remain visible), you can set this to ‘Off’.
Like what you see? This functionality is available in Max Mega Menu Pro