https://codepen.io/Ausjwill/full/GRRaZeJ
I am working on my personal portfolio and the following test “The navbar should always be at the top of the viewport” keeps failing. I am not sure why. Any assistance would be greatly appreciated!
https://codepen.io/Ausjwill/full/GRRaZeJ
I am working on my personal portfolio and the following test “The navbar should always be at the top of the viewport” keeps failing. I am not sure why. Any assistance would be greatly appreciated!
You should set the CSS to the <nav>
tag not in the <ul>
because in this case, the <nav>
tag is the container of <ul>
. Try like this:
nav{
position: fixed;
width: 100vw;
top: 0;
width: 100%;
}
Worked like a charm, thank you!