Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #917939

    Is it possible on Enfold to make the navigation menu sticky on mobile so that the hamburger menu is shown?

    #917970

    This is a solution that Moderator Victoria gave to me on that. Hope it works for you as well. :)

    @media only screen and (max-width: 767px) {
    .responsive #top #wrap_all #header {
    position: fixed;
    }
    }

    #917987

    That did make the menu sticky. Thank you!

    One follow up question, though. On mobile the header covers the hero slider up. I have left the code on for reference – http://lightfoundation.bammarketingagency.com/

    • This reply was modified 6 years, 8 months ago by longhi118.
    #917997

    I suspect this might do it. Again, code by Victoria:

    @media only screen and (max-width: 767px) {
    .responsive #top #main {
    padding-top: 100px !important;
    }

    #918255

    Hi longhi118,

    Looks fine on my end. Did the code above help you?


    @Verdaccio
    Thank you for sharing! :)

    Best regards,
    Victoria

    #918584

    Thank you for reaching out Victoria! The code works in getting the header to stay fixed on mobile but it changed several other css components. i.e. the header font is now different.

    #918609

    Hi,

    It looks like a bracket was left off the code. Please try the following:

    @media only screen and (max-width: 767px) {
    .responsive #top #main {
    padding-top: 100px !important;
    }}

    Best regards,
    Jordan Shannon

    #918627

    Unfortunately it doesn’t. If i change the padding number I do see it adjust the items beneath the header appropriately but the header isn’t fixed.

    #919440

    Hi,

    We have tested this code on your site. Please clear the cache by refreshing the browser a few times to view the changes.

    To make the header sticky in mobile please use the below code

    @media only screen and (max-width: 767px) {
    .responsive #top #wrap_all #header {
        position: fixed;
    }
    .responsive #top #main {
        padding-top: 131px !important;
    }
    }

    Best regards,
    Vinay

    #919998

    Vinay, the code you provided did the trick! Thank you!

    #920002

    Hi,

    I’m glaf Vinay’s suggestion was able to help. If you need anything else, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Sticky Header On Mobile’ is closed to new replies.