Answer the question
In order to leave comments, you need to log in
How to make a block sticky when scrolling, like in VK?
I want to implement the behavior of the "sticky" block in the same way as it is implemented in VK groups (or, say, in any group, for example " html css js " ), namely:
1. When we start scrolling down long content, the sidebar scrolls together with a long block until it reaches its lowest point. And stops.
2. When we start scrolling up the long content, the sidebar scrolls along with the long block until it reaches its top point. And stops.
I want to implement this in one of my projects :
1. For the sidebar with #shop-widgets I set the following styles:
#shop-widgets {
position: -webkit-sticky;
position: sticky;
top: 100px;
}
Answer the question
In order to leave comments, you need to log in
Preferably with standard css properties (if possible)
so it is empty, from what it is or not, nothing changes.
(You can of course build nginx without http support at all)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question