Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1197201
    MatthewChivers
    Participant

    I’m very confused.

    I want to change the width at which the standard menu changes to the hamburger / mobile button menu.

    I have tried various methods suggested both here on the forum and over at the X Theme Group on Facebook. None of them are working correctly.

    Really hoping someone can help.

    #1197391
    Rahul
    Moderator

    Hey There,

    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.

    #1197439
    MatthewChivers
    Participant

    Okay Awesome! It’s https://matthewchivers.co.uk/

    I’ve tried a number of @media solutions.
    Some have simply done nothing, others have had undesirable consequences.

    (All my attempts have now been deleted and “customise” is clean except for the css I’ve applied to other things).

    #1197600
    Joao
    Moderator

    Hi There,

    Please add the following code to Appereance > customizer > custom > CSS and adjust according to your needs.

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

    Hope that helps

    Joao

    #1198426
    MatthewChivers
    Participant

    Hey there.

    Thanks for the response but this hasn’t worked. πŸ™

    The menu is currently set to only become a mobile button at 200px wide. As you’ll be able to see, this isn’t happening.

    Customizer saved and cache cleared.

    Hope we can find a solution? πŸ™‚

    Matthew

    #1198464
    Thai
    Moderator

    Hi Matthew,

    Please try with this CSS instead:

    @media (max-width: 1024px){
    	a.x-btn-navbar {
            display: block;
            margin-left: auto;
            margin-right: auto;
            max-width: 42.16px;
        }
        .x-nav-wrap.desktop {
        	display: none;
        }
        .x-nav-wrap.mobile.collapse.in {
        	display: block;
        }
    }

    Hope it helps πŸ™‚

    #1199421
    MatthewChivers
    Participant

    Okay, I just tried that code and still nothing. Customizer saved and cache cleared.

    The exact code I used:

    @media (max-width: 100px){
    	a.x-btn-navbar {
            display: block;
            margin-left: auto;
            margin-right: auto;
            max-width: 42.16px;
        }
        .x-nav-wrap.desktop {
        	display: none;
        }
        .x-nav-wrap.mobile.collapse.in {
        	display: block;
        }
    }

    Changed the max width example from your 1024 to my 100 (put it so low just to prove that no matter how low it’s set it won’t change).

    πŸ™ Sad Times

    #1199460
    Thai
    Moderator

    Hi There,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link login to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1199501
    MatthewChivers
    Participant
    This reply has been marked as private.
    #1199740
    Rad
    Moderator

    Hi there,

    It’s the reverse, please try this

    @media (min-width: 100px){
        a.x-btn-navbar {
            display: none;
        }
        .x-nav-wrap.desktop {
        	display: block;
        }
        .x-nav-wrap.mobile {
        	display: none;
        }
    }

    That’s because mobile menu starts at 979px and max-width with the smaller size than 979px will just be the same. Hence to counter it, use min-width.

    Cheers!

    #1200575
    MatthewChivers
    Participant

    This is the closest it’s been to working! But the mobile menu is showing as well as the regular one now. Tried with old code in place, without it, and with !important in a couple of places.

    Thanks for the help so far! πŸ™‚

    #1200645
    Joao
    Moderator

    Hi There,

    Please add the following code(just the code below) and it will work for sure:

    
    @media (min-width: 100px) {
      
      .x-btn-navbar, .x-btn-navbar.collapsed {
      	display: none !important;
        }
      
        .x-nav-wrap.desktop {
        	display: block;
        }
        .x-nav-wrap.mobile {
        	display: none !important;
        }
    }

    Hope it helps

    #1200655
    MatthewChivers
    Participant

    YES!!! WE GOT THERE!
    Thank you very much. Really appreciate the help πŸ˜€

    #1200667
    Thai
    Moderator

    Glad we’re able to help πŸ™‚

    If you need anything else please let us know.

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