Disappearing anchor links- padding not working

I’m working on the Product Landing Page assignment and I’ve hit a brick wall. My problem is that I’m trying to get my anchored links for each section to stop disappearing under my fixed position navbar when I click on the menu.

I’ve tried padding but that’s not working. I’ve also tried several other options on stackoverflow but they’re not working either. I don’t know if the flexbox is getting in the way or not?

Technically, I’ve passed all the assignment criteria but I don’t want to submit it before I get this fixed.

Here’s my codepen.

Try making the anchor links have a relative position setting in the css and then set the top value to a negative value to push them down enough to make them act appropriately.
(I did this for my own product landing page)


Thank you so much!!! The relative position seems to have made the world of difference. I can go away and submit it now :):grin:

1 Like