Answers for "making nav bar sticky"

CSS
4

sticky navbar

<!-- The simplest solution: NO JAVASCRIPT, ONLY 3 LINES OF CODE.-->
<!-- Please vote if you find this useful -->

            <nav style="position: fixed;top; 0px;left: 0px;right: 0px;background-color: #ccc;padding: 20px;color: #fff!important;">
                <a href="#">MY COMPANY</a>
            </nav>
Posted by: Guest on July-26-2021
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