Why does my anchor tag go to the wrong place

Code: https://codepen.io/aoljaca/pen/OJyEKKY

When I click on about me it goes to projects instead of about me. I included the right anchor tag.



I think it’s just that it is covered by your nav bar because it is at the top of your screen.

How can I make the text appear in the middle of the screen? Instead of the top?

You’re going to want to do some googling to find the best answer for the way you want to do things. Here’s somewhere to get started:

The use of empty target elements and positioning for the links do not sit that well with me. In your case, I would just use a positive padding-top and a negative margin-top on each target element. And add a z-index to the nav.

More techniques for the links

1 Like

Yes thats what I used thank you!!