Answers for "sticky nav"

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
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

Browse Popular Code Answers by Language