[Resolved] Desktop menu when on mobile

Home Forums Support [Resolved] Desktop menu when on mobile

Home Forums Support Desktop menu when on mobile

  • This topic has 5 replies, 3 voices, and was last updated 7 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #300625
    Eric

    Dear sir/madam,

    For a landing page we needed to have a different menu, so I used the menu swapper plugin to achieve that. As you can see here we have only one main element and various subelements: http://eliv.com.tw/volunteernow/

    When on mobile I would like to have either the same view as on desktop, or I would like to have the whole list open right away when you click on the menu button (but would prefer the first option). Any help is much appreciated.

    Best regards,

    Florian

    #300642
    Leo
    Staff
    Customer Support

    Hi Florian,

    Not sure what you mean by having the same view? Like basically show the menu item without the menu toggle?
    If so you can try adding the link straight to the mobile header: https://docs.generatepress.com/article/mobile-header/#adding-html-inside-the-mobile-header

    If you want the whole list to open right away then try making a new menu and set to slideout menu in theme location:
    https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#setting-a-theme-location

    Let me know if helps.

    #300721
    Tom
    Lead Developer
    Lead Developer

    You could try something like this: https://generatepress.com/forums/topic/full-menu-topics-in-mobile-view/#post-219222

    That should show all of your menu items on mobile without the need for the mobile menu.

    #301844
    Eric

    Thank you,

    Tom, your solution worked!

    Only thing question I have left is, how can I make the menu float right and not on the left? I replaced all code that says left to right, but there is no effect yet (see eliv.com.tw/volunteernow):


    @media
    (max-width: 769px) {
    .menu-toggle,
    .main-navigation.toggled .main-nav > ul {
    display: none !important;
    }
    .main-navigation ul,
    .main-navigation ul li:hover > ul,
    .sf-menu li:hover > ul, .sf-menu li.sfHover > ul {
    display: block;
    }
    .main-nav .sf-menu > li {
    float: right;
    clear: none;
    }
    .nav-aligned-center.nav-below-header .main-navigation .menu > li,
    .nav-aligned-center.nav-below-header .main-navigation .sf-menu > li {
    display: inline-block;
    }
    .main-navigation .main-nav ul ul {
    display: none;
    float: right;
    position: absolute;
    top: auto;
    left: 0;
    z-index: 99999;
    width:200px;
    text-align:right;
    }
    .main-navigation .main-nav ul ul ul {
    right: 100%;
    top: 0;
    }
    .mobile-bar-items {
    display: none;
    }
    }

    #301846
    Eric

    Oh, I’m sorry it was very simple… Just added !important and it worked

    Thanks!

    #302150
    Tom
    Lead Developer
    Lead Developer

    Glad you got it working! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.