[Support request] Sticky top bar together with header

Home Forums Support [Support request] Sticky top bar together with header

Home Forums Support Sticky top bar together with header

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1052559
    Kim

    Hi Leo,

    We have been exchanging some messages a few hours ago in https://generatepress.com/forums/topic/how-to-keep-top-bar-sticky-as-the-navigation-bar/#post-1052388.

    I opened a new topic to share my website (as your requested) in the private section that only admins can see. However not sure if my e-mail really came through. SO just to be sure I am sending it (again).

    Could you please check out my site and give me advice on how to make to top bar sticky as well? And now I have to header sticky both menu and logo are not on the same place any more when srolling. How can I make sure their position is fixed?

    Thanks again for your support!

    Kim

    #1052669
    David
    Staff
    Customer Support

    Hi there,

    add this CSS:

    .top-bar {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    .sticky-enabled .main-navigation.is_stuck {
        top: 40px !important;
    }

    Then in Customizer > Layout > Primary Navigation change the inner container to contained.

    #1052685
    Kim

    Thanks a lot Leo and David! It works!

    #1052741
    David
    Staff
    Customer Support

    Glad we could be of help.

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