Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1310604
    powrider686
    Participant

    Hey there,
    On my site http://atouchofmagic.wpengine.com/, I’d like to have the topbar be sticky along with the navbar.

    How might I achieve that?

    Thanks for the help!

    Marcus

    #1310678
    Prasant Rai
    Moderator

    Hello Marcus,

    Thanks for writing in!

    You can add this under Custom > CSS in the Customizer:

    @media (min-width: 980px) {
        .x-navbar, .x-navbar.x-navbar-fixed-top {
            margin-top: 45px;
        }
        .x-topbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100% !important;
            background-color: #000000;
        }
    }

    Thanks.

    #1310691
    powrider686
    Participant

    That almost did the trick but not quite.

    Now when you scroll there is a gap that shows up when the sticky happens. And I removed the color code because it made the whole topbar white and covered everything else.

    I attached a screenshot so you could see.

    Thanks for the help!

    #1310710
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    Please change the values of margin-top from 45px to 30px. Let us know how it goes.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1310604 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>