Site logo

Archived topic

Mobile : Place the dropdown on the menu text

7 replies · Started by Andre on September 30, 2021

Viewing posts 1–8 of 8

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>...

Citizens’ Assemblies<span role="button" class="dropdown-menu-toggle" tabindex="0" aria-expanded="false" aria-label="Open Sub-Menu"><span class="gp-icon icon-arrow"><svg viewBox="0 0 330 512" aria-hidden="true" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em">

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!

This archived topic is closed to new replies.