User Story #13: The navbar should always be at the top of the viewport. how can i do this?

Tell us what’s happening:
Hello I don’t know how to make the navbar to be always on the top. Here is my code Any help would be appreciated.
Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36.

Challenge: Build a Product Landing Page

Link to the challenge:

Hello @lic.icordero ,

there are various things on how you could approach that.
I would recommend, for a really simple solution, to have a look on the positions property. Position: fixed; should work in your case. Other than that you should add a padding on the section to have a white background under the navbar.

I believe you wanted to use the .container to wrap around your section? Currently the container div is not doing anything.

When test fail click the red button to see which test(s) are failing and text to help you correct the issue.

  • Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

Thanks!!! I tried adding position: fixed in the nav, but it didn’t resolve the problem.

Thanks. I read it but im new with coding, i don’t understand what is the problem with the page.

I found the solution here:


1 Like

Good job on researching and finding what you were looking for.
You learn more when you research and find what you’re looking for because it gives you a deeper understanding. Much more so than having someone say, “do this to fix it”.