Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1295636
    RinardMedia
    Participant

    Hello!

    My goal was to make the menu drop to the mobile nav sooner so that the desktop nav doesn’t jump to the next line. This is the code I used. I am sure I missed something as during this pixel range, the mobile nav button doesn’t work. I also want the button to align center during this range.

    devmmh.rinard.digital

    @media (min-width: 980px) and (max-width: 1200px){
    .x-navbar .x-btn-navbar {
    display: inline-block;
    }
    }
    @media (min-width: 980px) and (max-width: 1200px){
    .x-navbar .desktop .x-nav {
    display: none;
    }
    }

    Thanks for your help!

    #1295641
    Joao
    Moderator

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1295898
    RinardMedia
    Participant

    I did. 🙂
    It’s devmmh.rinard.digital

    #1295932
    Joao
    Moderator

    Hi There,

    Use the following code instead.

    Hope it helps

    @media (max-width: 1200px) {
        a.x-btn-navbar {
            display: inline-block;
            float: right;
        }
       .x-nav-wrap.mobile.collapse.in {
          display: block;
        }
       .x-nav-wrap.desktop {
        display: none;
       }
    }
    #1295949
    RinardMedia
    Participant

    Much better. How can I center the button?

    #1295976
    Joao
    Moderator

    Hi There,

    Update the code to :

    
    @media (max-width: 1200px) {
        a.x-btn-navbar {
            display: inline-block;
            float: none;
        }
       .x-nav-wrap.mobile.collapse.in {
          display: block;
        }
       .x-nav-wrap.desktop {
        display: none;
       }
    }

    Hope it helps

    Joao

    #1295982
    RinardMedia
    Participant

    That’s a little bit closer. Still around 1200px the mobile menu button aligns left, once the site drops to about 790px it aligns center.

    How can we make it align center the entire range?

    Thank you for your help!

    #1295988
    Joao
    Moderator

    Hi There,

    Please add the following code:

    .x-navbar-inner {
        text-align: center;
    }

    Thanks

    Joao

    #1296002
    RinardMedia
    Participant

    That did it.

    Thanks so much!

    #1296010
    Joao
    Moderator

    Glad to hear it 🙂
    Have a great weekend.

  • <script> jQuery(function($){ $("#no-reply-1295636 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>