Navbar is not staying at the top

I am making a project landing page but the nav-bar is not staying at top while scrolling it only remains for some time. https://codepen.io/badun34/pen/NWNMqvG

The navbar is being covered by some elements.

In your CSS, add the z-index property and set it to any positive integer - maybe 5 or so - on the fixed navbar.

1 Like

I am a beginner, I can input whatever I know.
We generally include

<nav class="nav navbar">
...
</nav>

<head>
<style>
.navbar{
 position: fixed;
}
</style>
</head>

It will work for sure

Thanks for your suggestion it worked

1 Like

i have used it in code but still thanks for you help

add name attribute in email input to complete remaining test
also add
<script src=“https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js”> </script>
on your page to check test passed and faiiled