Archived topic
center menu items with dropdown
7 replies · Started by Alfonso on June 29, 2021
Viewing posts 1–8 of 8
Hi there, my menu items with dropdown subemnu are not centered, how i can fix it??
Hi there,
try adding this CSS:
@media(min-width: 769px) {
.main-navigation:not(.toggled) ul li:hover > ul.sub-menu {
left: 50%;
transform: translate3d(-100px,0,0);
}
}
Hi Alfonso,
Give this CSS a try:
span.dropdown-menu-toggle {
position: absolute;
}
.main-navigation .main-nav > ul > li {
padding: 0 13px;
}
Hi Ying,
Now is look better, so is not possible to align center taking into account the dropdown arrow:
You can try add this CSS as well:
.menu-item-has-children br + .dropdown-menu-toggle {
top: 0.5em;
}
li#menu-item-1416 svg {
left: 20px;
}
It is not the solution I expected but maybe it could be worth it
I don't see a better solution, but if you do, please share with me :)
This archived topic is closed to new replies.