Answers for "how to fix a navbar"

CSS
7

stick menu bar in css

.navigation {
   /* fixed keyword is fine too */
   position: sticky;
   top: 0;
   z-index: 100;
   /* z-index works pretty much like a layer:
   the higher the z-index value, the greater
   it will allow the navigation tag to stay on top
   of other tags */
}
Posted by: Guest on July-30-2020
0

how to fix nav bar position

<div class="navbar">
  <a href="#home">Home</a>
  <a href="#news">News</a>
  
<a href="#contact">Contact</a>
</div>

<div class="main">
  
<p>Some text some text some text some text..</p>
</div>
Posted by: Guest on June-10-2021

Browse Popular Code Answers by Language