[Resolved] How to make mobile top bar stick in addition to menu

Home Forums Support [Resolved] How to make mobile top bar stick in addition to menu

Home Forums Support How to make mobile top bar stick in addition to menu

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #637087
    Katja

    Hello,

    I would like to make the top bar on a mobile screen sticky in addition to the main menu that is currently sticky. I seeem to remember reading something about sticking additional elements but can’t find it now. Obviously the main menu would need to sit underneath the top bar to form one visual unit.

    Many thanks for any help.

    Have updated as requested. Thanks.

    #637120
    David
    Staff
    Customer Support

    Hi there,

    are you able to share a link to your site? you can edit your original topic and use the Site URL field for privacy.

    #637945
    Katja

    Thanks for the quick response. Have updated as requested.

    #638025
    David
    Staff
    Customer Support

    A bit experimental but we could try this CSS:

    .top-bar {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 200;
    }
    .sticky-enabled .main-navigation.is_stuck {
        top: 49px !important;
    }
    @media (max-width: 495px) {
        .sticky-enabled .main-navigation.is_stuck {
            top: 41px !important;
        }
    }
    #638373
    Katja

    David, thanks again

    I won’t be able to check this out til Friday morning CET so will get back to you then and hopt to mark as resolved.

    #638505
    David
    Staff
    Customer Support

    You’re welcome. Keep us posted.

    #639259
    Katja

    David,

    just wanted to let you know that the CSS you supplied worked a treat. Thanks for your help.

    The GeneratePress theme is such a great and easy to use package that I have hardly ever needed to use the support. But on the rare times I have you guys have been very quick to respond with immediate solutions to my question. Thanks for the great product and the support.

    Roger

    #639333
    David
    Staff
    Customer Support

    Awesome. Glad to hear it worked!
    And thank you for the kind words, Tom and Leo set a might high bar when it comes to support, glad we can deliver on that!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.