Archived topic
Submenu on both normal and sticky the same
3 replies · Started by Edwin on May 22, 2019
Hi
How can I show normal sub menu and sticky sub-menu to show in the same position?
Normal sub-menu is showing in middle. Sticky sub-menu is showing all left.
nav .main-nav .mega-menu > ul {
position: absolute;
width: 40%;
left: 500px !important;
}
This seems to work, but how to apply it only to sticky menu?
Thanks
Edwin
Hi there,
try this - look for this CSS:
nav .main-nav .mega-menu {
position: static;
}
Change it to position: relative;
Then in your CSS aboce you would need to replace the width: 40%; with a fixed width eg. width: 600px;
the left property can now be used to position it relative to its parent menu item, which will apply to both static and sticky.
Thanks David
That worked :-)
Glad to be of help