Archived topic
Mobile : Place the dropdown on the menu text
7 replies · Started by Andre on September 30, 2021
Hi,
Some visitors don't understand that you have to click on the arrow to scroll the sub-navigation on a smartphone.
How can I adapt the code ?
To add class="dropdown-menu-toggle" on
Now is on <span>...
Best regards,
Andre
Hi there,
are the Parent Menus a link themselves ? Or do you want them to simply open the sub menu?
Can you share a link to the site so i can see the setup ?
Hi Andre,
Can you try add # as the parent menu item link instead of leaving it blank?
Let me know if this helps :)
Perfect, thanks !
If you have contacts with WPML, you can notify them of this problem. Indeed, the problem persists with the navigation of languages.
Best regards, andre.
Try adding this CSS to make the language selector behave the same way:
@media(max-width: 768px) {
.main-navigation.toggled .menu-item-has-children.wpml-ls-menu-item a {
padding-left: 24px;
position: relative;
}
.main-navigation.toggled .menu-item-has-children.wpml-ls-menu-item .dropdown-menu-toggle {
position: absolute;
left: 5px;
top; 0;
bottom: 0;
width: 100%;
z-index: 1;
}
}
Just perfect!
Wonderful efficiency :)
Thank you.
Glad we could be of help!