[Resolved] Sticky Top Bar AND Main Navigation

Home Forums Support [Resolved] Sticky Top Bar AND Main Navigation

Home Forums Support Sticky Top Bar AND Main Navigation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #797922
    Matt Stern

    Hi Guys,

    I’m trying to make both the top bar and the main navigation sticky at this URL:

    https://naturespirit.dev.onpressidium.com/.

    I’ve added this bit of code:

    /* Makes top bar and primary nav. sticky (disable sticky setting in customizer first) */
    .top-bar {
    position: -webkit-sticky;
    position: sticky;
    top: 0px;
    z-index: 99;
    }
    #site-navigation {
    position: -webkit-sticky;
    position: sticky;
    top: 29px; /* This is the height of the top bar */
    }

    Sticky Navigation is turned off in the customizer.

    What am I missing?

    Thanks!

    Matt

    #797963
    Leo
    Staff
    Customer Support

    Hi there,

    Try this instead:
    /* Makes top bar and primary nav. sticky (disable sticky setting in customizer first) */

    .top-bar {
        position: -webkit-sticky;
        position: sticky;
        top: 0px;
        z-index: 99;
    }
    .site-header {
        position: -webkit-sticky;
        position: sticky;
        top: 29px; /* This is the height of the top bar */
        z-index: 999;
    }

    Let me know ๐Ÿ™‚

    #797967
    Matt Stern

    Worked like a charm. Thanks, Leo.

    #797971
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

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