Answer the question
In order to leave comments, you need to log in
How to snap the menu to the top when scrolling the page?
I want the menu to remain visible when scrolling down the page, and not go up
Please help =) If there is some class in the bootstrap or via css somehow? I will be very grateful =)
PS Thank you!
Answer the question
In order to leave comments, you need to log in
Is this your first freelancing assignment?
Tryposition: fixed;
For example, a menu (.top-navbar) 50px high glued to the screen:
.top-navbar{
position: fixed;
z-index: 10;
top: 0;
left: 0;
right 0:
width: 100%;
height: 50px;
}
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" data-spy="affix" data-offset-top="50">
<div class="container">
...
</div>
</nav>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question