Site logo

[Resolved] sticky top bar

Home Forums Support [Resolved] sticky top bar

Home Forums Support sticky top bar

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1893943
    Alex Bukin

    Hello,

    I am having an issue with top bar sticky option on all views on scroll.
    The header and navigation set to sticky in customizer.
    The link to my site https://fr8data.com/
    Any idea to resolve the issue?

    Regards,

    Alex

    #1893952
    Leo
    Staff
    Customer Support

    Hi Alex,

    Just to confirm, do you want the top bar and header/navigation both sticky?

    If so can you disable the sticky navigation option first?

    We will just do it together with CSS.

    Let me know 🙂

    #1893953
    Alex Bukin

    I turned off Sticky Navigation and Sticky Header

    #1893979
    Ying
    Staff
    Customer Support

    Hi Alex,

    Give this CSS a try:

    @media (min-width: 769px) {
    .gb-container.gb-container-0081696b, #site-navigation {
        position: fixed;
        width:100%;
        z-index: 2000;
    }
    
    #site-navigation {
        top: 34px;
    }
    .gb-container.gb-container-0081696b {
        top: 0;
    }
    nav#site-navigation + * {
        margin-top: 114px;
    }
    }

    Let me know 🙂

    #1893982
    Alex Bukin

    Ying,

    The desktop and tablet works, mobile is not.

    Thanks,
    Alex

    #1893985
    Ying
    Staff
    Customer Support

    Right, the CSS was only for desktop and tablet. I wasn’t sure if you want them sticky on mobile as well.

    Try this CSS for mobile:

    @media (max-width: 768px) {
    .gb-container.gb-container-0081696b, #mobile-header {
        position: fixed;
        width: 100%;
        z-index: 1000;
    }
    
    #mobile-header {
        top: 39px;
    }
    
    .gb-container.gb-container-0081696b {
        top: 0;
    }
    
    #site-navigation + * {
        margin-top: 95px;
    }
    }
    #1893989
    Alex Bukin

    It is working now.
    Thank you very much.

    Alex

    #1894010
    Ying
    Staff
    Customer Support

    You are welcome 🙂

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