Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #888154
    Rifft
    Participant

    Hello guys,

    I would like to be helped with my mobile/tablet hamburger menu.
    On desktop, my custom navbar is working well but on smaller devices, the background is transparent. Also, i would like to keep the 4th menu item with purple background.

    What can i do ?

    Thanks a lot.

    BR

    #888157
    Rifft
    Participant
    This reply has been marked as private.
    #888292
    John Ezra
    Member

    Hi there,

    Thanks for writing in! You can add this under Custom > CSS in the Customizer or in your child theme’s style.css file.

    .x-nav-wrap {
        background: #444;
        padding: 20px;
    }

    Hope this helps – thanks!

    #888349
    Rifft
    Participant

    Hey,

    Thanks a lot for your quick answer.
    The background-color is working well but the 20px padding created an issue on the desktop version. (cf screen screen-forum-2) so i had to delete this line.

    Also, is there a way to extend the menu to fit the width of the screen (cf screen-forum-3 : its a jpeg version of what i would like to do) ?
    What about the margin between the menu item and the line ?

    Thanks a lot.

    BR

    #888359
    Rifft
    Participant

    And here is the screen-forum-2.

    #889120
    Nabeel A
    Moderator

    Hi again,

    Please replace the previous code with this one:

    @media screen and (max-width: 979px) {
    .x-nav-wrap.mobile {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: 64px !important;
        padding: 0 40px !important;
    }
    }

    Let us know how this goes!

    #889888
    Rifft
    Participant

    Hi Nabeel, thanks for your help.
    Actually, i don’t see any changes with this code.

    Can you have a look ?
    Do not hesitate to use my credentials and check the B.O. if needed.

    Thanks again

    #890179
    Thai
    Moderator

    Hi There,

    Please try with this CSS instead:

    @media screen and (max-width: 979px) {
        .x-navbar.x-navbar-fixed-top {
            position: fixed !important;
            left: 0 !important;
            right: 0 !important;
            width: 100%;
        }
    }

    Hope it helps 🙂

    #890214
    Rifft
    Participant

    Hi Thai, thanks for your help.
    I’m afraid the problem remains, there is no change with this code as well.

    Is there maybe something i’m doing wrong when i use your code ?

    Thanks again

    #891014
    Lely
    Moderator

    Hello BR,

    The above code is working as expected. But we need to set navbar height to auto on mobile view. Please update above CSS to this:

    @media screen and (max-width: 979px) {
        .x-navbar.x-navbar-fixed-top {
            position: fixed !important;
            left: 0 !important;
            right: 0 !important;
            width: 100%;
        }
       .x-navbar-inner {
        height: auto;
        }
    }

    Hope this helps.

    #891419
    Rifft
    Participant

    Hello Lely,

    Thanks for your help.
    It still not working on my devices.

    Is there something i’m doing wrong ? 🙁

    #891937
    Rupok
    Member

    Hi there,

    Thanks for updating. Yes certainly you are doing something wrong. Maybe you didn’t even add this correctly to your Customizer. I just went through your Customizer and added the suggested code by Lely which is working fine as expected. I kept this to make sure it works and you can see this.

    Hope this makes sense.

    Cheers!

    #893171
    Rifft
    Participant

    All right, because i may have read too quickly, i though i have to add this code in appearance > editor > (child)style.css instead of appearance > customizer -_- .

    Thanks for your help, all five of you :):):)

    #893717
    Jack
    Keymaster

    You’re most welcome! Glad you got this resolved. 🙂 Let us know if we can be of any further assistance.

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