Fixer header css

Web1.Add position property as absolute for the div you wish to fix . 2.Keep the body overflow property auto. Note: setting the z-index of the body to -1 will make the rest of body inaccessible. Reference : …WebFeb 15, 2024 · I expected this CSS code to work but the elements are just sitting next to each other. header { width: 100%; position: fixed; display: flex; align-content: space-between; }

javascript - TailwindCss Fixed NavBar - Stack Overflow

WebEdit your css like this #site-header { padding-top: 110px; margin-bottom: 50px; } #site-header .logo h1 img { width: 100%; } .logo { font-size: 100%; position: fixed; left: 45%; top: -21px; width: 10%; z-index: 1000; } Important, you must use a png logo. Share Improve this answer Follow answered Dec 28, 2014 at 16:39 HareeshWebI'm trying to create a Fixed Navigation Bar in Tailwind CSS and sticky scroll main page, but no matter what I try, I can't make it work... Here is what I achieved: Here is my Code: