So i’m missing the last piece, and to be honest, i worked with a youtube video, who copy and past the whole navbar and then styled it a bit. I tried that myself and first, it now looks not what it was before, but i achieved the goal of the test, so i don’t really care ^^, but now this viewport is giving me trouble.
When you’re coding with Codepen, the basic HTML is already configured for you. So when you’re typing into the HTML block it has already generated
<html>
<head>
</head>
<body>
<!-- This is where all of the html you're typing will go -->
</body>
</html>
When your navbar has position: fixed; this gives you the ability to use the properties of topleftright and bottom.
So step one is to remove the <body> and </body> from the code you’ve written.
Step two is to look at position:fixed here CSS Layout - The position Property
and see if you can solve why your navbar isn’t attached to the top of the viewport.
hey thanks for the help, i read through it and understood the positioning. It is still not working. To my knowledge you put the in the body, which i did, but there still has to be some problem with my code. would you look into it again?
thank you in advance.
Edit: i found the mistake. i was calling class=navbar instead of calling the nav itself in the css that happened because i changed a few things around and missed that part.