Site logo

[Support request] Primary navigation – appear only upon scroll.

Home Forums Support [Support request] Primary navigation – appear only upon scroll.

Home Forums Support Primary navigation – appear only upon scroll.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2524921
    ammgbr

    Hi, how can I hide the primary navigation and have it appear only upon scrolling down?

    I think there is a CSS solution back from a few years ago but this might be out of date.

    #2524980
    Ying
    Staff
    Customer Support

    Hi there,

    Try this:

    .main-navigation:not(.is_stuck) {
        display: none;
    }
    #2524988
    ammgbr

    Thank you that’s resolved! 😀

    #2525004
    Ying
    Staff
    Customer Support

    You are welcome   🙂

    #2525041
    ammgbr

    Apologies for the follow up, is it possible to have this CSS work only for the home page and not the rest of the website?

    #2525080
    Ying
    Staff
    Customer Support

    Yes, you just need to add .home to the selector:

    .home .main-navigation:not(.is_stuck) {
        display: none;
    }
    #2525128
    ammgbr

    thank you:)

    #2525132
    Ying
    Staff
    Customer Support

    No Problem 🙂

    #2526215
    ammgbr

    Apologies for coming back to this, the solution works for desktop but not for mobile. Is it possible to make it applicable to all devices??

    #2526562
    Fernando
    Customer Support

    Hello there,

    Try replacing the code you have with this:

    .home nav#mobile-header:not(.is_stuck) .inside-navigation.grid-container.grid-parent, .home .main-navigation:not(.is_stuck) {
        display: none;
    }
    #2527661
    ammgbr

    Thank you 🙂

    #2527870
    Fernando
    Customer Support

    You’re welcome! 🙂

    #2554538
    ammgbr

    Hi, the above code stopped working on mobile. Is there anything I should amend in the css above?

    #2554561
    Leo
    Staff
    Customer Support

    That CSS should still work – nothing has changed on our end.

    I’m not seeing it being added either so I’m assuming that there is a syntax error somewhere as mentioned in your other post.

    You can move it to the top of all your CSS to test as well.

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