This topic has 2 replies, 2 voices, and was last updated 4 years, 7 months ago ago by John Holden
Ok so i am making mega menu static blocks with elementor and everything is going fine there, but the dropdowns of the mega menus are not centered, they are set to the far left everytime for every dropdown. The weird thing is when the page first loads and before it finishes, the mega menus will be centerd but once the page finishes loading, they float left.
Here is the way they are positioned now:
https://imgur.com/OGvrzeT
Here is what i want them to look like
https://imgur.com/YsPiYm5
I was able to align the above dropdown with custom css, issue is, its not a “center” align code with css, its a ‘ position: relative; left: -100px; ‘ css so i cant align each dropdown to be center because i need to set a specific number for each individual dropdown box which makes them all off center by a little bit as each guests screen size will vary.
So i am looking for what css i need to enter for the selector ‘ menu-static-block nav-sublist-dropdown ‘ to make all of the mega menu dropdowns to be centered aligned.
thank you.
Hi,
Try to use the next custom CSS code:
.menu-static-block.nav-sublist-dropdown {
left: 50% !important;
transform: translateX(-50%) !important;
margin: 0 !important;
animation: et-fadeIn .3s ease !important;
display: block;
opacity: 0;
visibility: hidden;
transition: all .2s ease-in-out;
}
.item-design-mega-menu {
position: static;
}
.item-design-mega-menu:hover .menu-static-block.nav-sublist-dropdown {
opacity: 1;
visibility: visible;
}
Regards,
Hung PD
You must be logged in to reply to this topic.Log in/Sign up