Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1123372
    marcooos
    Participant

    Hi, first of all I’ve been reading through the forum – thank you for your amazing support, great to see.

    1. I’ve added some custom code I found on the forum to disable the “3 line menu button” on mobile:

    @media (max-width: 979px) {
        .x-nav-wrap.mobile.collapse {
          display: block!important;
          height: 100%!important;
        }
        a.x-btn-navbar {
           display: none!important;
        }
    }
    
    .x-navbar .x-nav-wrap .x-nav > li > a {
        text-align:center;
    }

    I wanted to change it so that the mobile menu is only activated on devices displaying under 500px width. Changing “max-width” to anything lower in the code above seems to reactivate the “3 line menu button”.

    2. Is it possible to disable the search box on the menu ONLY on mobile (under 500px width)?

    3. Is it possible to remove the line and spacing under the logo when on mobile? (see image attached)

    #1123400
    marcooos
    Participant
    This reply has been marked as private.
    #1123426
    Christopher
    Moderator

    Hi there,

    Please update your code to :

    @media (max-width: 979px) and (min-width:500px) {
        .x-nav-wrap.mobile.collapse {
          display: block!important;
          height: 100%!important;
        }
        a.x-btn-navbar {
           display: none!important;
        }
    }
    @media (max-width:500px){
    li.menu-item.x-menu-item.x-menu-item-search {
        display: none;
    }
    .x-logobar {
        border-bottom: none;
    }
    }
    
    .x-navbar .x-nav-wrap .x-nav > li > a {
        text-align:center;
    }

    Hope it helps.

    #1124949
    marcooos
    Participant

    Hi Christopher.

    That seems to have solved problem number 1, but I think you missed number 2 & 3 on my original post?

    #1125226
    Paul R
    Moderator

    Hi Marcos,

    I can see, it also solved problem 2.

    Search no longer showing below 500px

    http://screencast.com/t/2sMfKNCrpyA

    For #3

    You can add this under Custom > Edit Global CSS in the Customizer.

    
    @media (max-width: 979px) {
    body .x-logobar {
       border:0;
    }
    
    body .x-navbar {
       box-shadow:none;
    }
    body .masthead-stacked .mobile .x-nav {
        margin-top: 0;
    }
    }
    
    

    Hope that helps.

    #1130474
    marcooos
    Participant

    Paul, you’re a legend, thank you.

    #1130570
    Rue Nel
    Moderator

    You’re most welcome!
    We’re glad we were able to help you out.

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