.sticky,
.sticky-alt {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 5;
}


/* Add some top padding to the page content to prevent sudden quick movement (as the navigation bar gets a new position at the top of the page (position:fixed and top:0) */

.navbar-sticky .sticky+.container {
    margin-top: 40px;
}


/* We add a case for when menu is open before becoming sticky to make the shift less harsh, 240px is the current height of the menu when open*/

.navbar-sticky .sticky.open+.container {
    margin-top: 240px;
}