Answers for "navbar stick to top"

CSS
1

css sticky navigatiojn

nav {
	position:sticky;
	top:0;
}

/*Top can be replaced with bottom, left, or right 
	depending on what you want :) */
Posted by: Guest on November-05-2020
0

how to make stickey navbar

<div id="navbar">
  <a href="#home">Home</a>
  <a href="#news">News</a>
  
  <a href="#contact">Contact</a>
</div>
Posted by: Guest on May-06-2021

Browse Popular Code Answers by Language