Link to section leads to the end of the section above

Hi Webflowers

I try to link to a section in the same page. I’ve done it million times before. but now, for some reason, when I click the link it takes me to the section but to the end of the section above it and not to the beginning of the linked section (so the desired section isn’t shown, I need to scroll to reach it).

why it is happening? would appreciate any help


https://preview.webflow.com/preview/playbook-rashuyot?utm_medium=preview_link&utm_source=designer&utm_content=playbook-rashuyot&preview=c1742a406be8b7f44eca6b3852bb7b63&mode=preview

Hey there @nirsh!

When I view the site, the section anchors seem to scroll to the correct position. Would it be possible to share a quick recording or screenshot, so I can understand what you’re seeing in case this is still happening for you?

Let me know, and I would be more than happy to continue helping out here.


​My best,
​Riley

Hi Riley!
the problem is solved.

the thing was that my nav bar was fixed to the right side of the page (height: 100vh) - and apparently if the nav bar itself is position:fixed and you click on an anchor link - it gets the section to the bottom of the nav bar. so if the nav bar ends at the bottom of the page (like in my case) the section position (after calling it with an anchor link) will be 100vh+1px .

so I moved the position fixed from the nav bar and wrapped it with a fixed regular div.

: )

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.