1

I have a simple website wit a few sections. I created a nav bar at the top of the website and menu inside it. When I click "about us" ("O nas" in Polish) on the menu it should navigate me to the top of the "O nas" div because my id is there. But it doesnt navigate me to the top, it navigates me to the first p tag instaed of h1 tag. Why? here is the snippet of the code:

enter image description here This is how it works: enter image description here

this is how it should work: enter image description here

I tried to write me id just next to the h1 tag but it didnt change anything. I treid to add <a name="onas"> before my div and it still doesnt work

Dorota
  • 11
  • 3
  • I think that it does what you want, but the title is hidden behind your fixed header. You can have a look at how to solve this here: [Fixed page header overlaps in-page anchors](https://stackoverflow.com/questions/4086107/fixed-page-header-overlaps-in-page-anchors) – Alex Feb 25 '23 at 09:34

0 Answers0