Using position: fixed for Sticky Elements in CSS


Fix the position of an element on the screen, so it doesn’t move upon scrolling.

Source Code

.sticky {
    position: fixed;
    top: 0;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments