Site logo

[Resolved] Disabling Top Bar leaves white space at top on scroll

Home Forums Support [Resolved] Disabling Top Bar leaves white space at top on scroll

Home Forums Support Disabling Top Bar leaves white space at top on scroll

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1849088
    Chad

    I’ve disabled the top bar under the Content Container > Disable Elements in WP Admin, but when the user scrolls there is a white space at the top.

    Any ideas?

    Thanks!

    #1849101
    David
    Staff
    Customer Support

    Hi there,

    your site is not allowing me access – it has Access Denied. Can you check the URL and let me know

    #1849213
    Chad

    Hi David,

    Sorry, the site can only be accessed within the US.

    But maybe try to access this other link.

    #1849217
    Leo
    Staff
    Customer Support

    That’s because you are using this CSS to fix the header:

    .site-header {
        position: fixed;
        width: 100%;
        top: 40px;
        z-index: 99;
    }

    So the site header is always 40px from the top regardless there is a top bar or not.

    #1849232
    Chad

    Okay, thanks!

    Are we adding the sticky header the wrong way? Is there a way to achieve this without CSS (or just a better way)?

    Thanks again!

    #1849249
    Leo
    Staff
    Customer Support

    Is that all you want in the header? Just a logo and no menu items?

    #1849260
    Chad

    On that specific page yes. We have a handful of pages that disable some elements, but most of our pages display the full header, nav and top bar.

    So, we want the sticky header globally. Hope that makes sense and thanks again!

    #1849268
    Ying
    Staff
    Customer Support

    Hi Chad,

    If you don’t need any transition effect for the sticky header, then using CSS is the better way compared to using the sticky option in the customizer, since CSS loads faster than Javascript.

    You can try this CSS for this specific page:

    .page-id-5392 .site-header {
        top: 0;
    }
    #1849358
    Chad

    Okay, so basically I could add .site header {top: 0;} to all of our pages that I’ve disabled the top bar?

    #1849365
    Ying
    Staff
    Customer Support

    Yes, correct 🙂

    #1849404
    Chad

    OKay, will go this route. Thank you!

    #1849409
    Ying
    Staff
    Customer Support

    No problem 🙂

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