Hello, i’m trying to pass this test of the last challenge of the web design certification. The navbar should stick to the top of the viewport and for that i’m using the property “position: sticky”. Regardless, the navbar does not stick to the top. I would need some help to understand what’s going wrong.
First, i can see a missing part in your last a tag. <a href="" target="_blank" id="profile-link"
Second, sticky is like a combination of fixed an relative position, so, when the parent tag (in this case main moves out from the viewport, the section navbar will also do so.
also, you can use the nav tag instead section for your navbar
@ricardoantonio I never used the sticky type, but I think it would be better to use the fixed type here. After he can adapt his code in function of that. What do you think about this ?
I don’t know if it is possible to do in another way, I tried to do this with flexbox but I didn’t arrive except if the navbar or menu is at the sides (right or left)
Thanks! it seems the problem was in the missing “>” symbol. I’ve tried with fixed and it didn’t work at first but it might have been the “>” that was missing.