I have tried this for two days but still I couldn't find the solution can any one please help me in this.
Asked
Active
Viewed 472 times
2 Answers
0
I suppose your header HTML be like:
the CSS for it to stick on top must be:
.header {
position: fixed;
width: 100vw;
top: 0px;
left: 0px;
}

Cuong Hoang
- 558
- 1
- 3
- 14
-
i tried this already but when we give position as fixed it is at the top of the page, but i need like after scrolling down to the header position it should be fixed at the top. – Jeeva Sep 14 '20 at 08:22