Lance B Lance B - 4 months ago 11
CSS Question

How do I make my bottom navbar stick to my top navbar?

I have two navbars. The top navbar sticks to the top of the page when the user scrolls down. When the user logs in, the bottom navbar becomes visible. But the bottom navbar is not sticky and disappears when scrolled down. How do I make the bottom navbar stick to the top navbar when scrolled down?

https://jsfiddle.net/Lance_Bitner/qqsx00sv/2/

.second_fixed_menu {
border-color: rgba(91, 172, 220, 0.95);
margin-top: 63px;
}

.second_fixed_menu .sub_menu {
float: right;
}

Answer

this is one solution i found.

Remove your margin-top: 63px for .second-fixed-menu and add:

position: fixed;
top: 63px;
left: 0px;
Comments