Anchor link behavior changes every time the link is clicked

I need to add a anchor link to a button. So far so good, there are quite a few explainers how to do that and it works.

The issue is that the first time I click on the CTA button the page scrolls slightly above the anchored element, so that it’s not really visible.

Then, the second time I click on it, it scrolls below the anchored element.

I tried moving the anchor to different elements, but this is always the case.

My question is, why is the anchor behaving differently depending on if it’s the first click or not and how can I fix this?

Thanks!

Hi, @RManev. Can you provide a link? Or create a demo page that shows the same behaviour?

Without being able to see the page and use the inspector to look at what’s going on, it’s likely the community cannot assist.

Thanks! — Jaycee

Good point, @Jaycee_Lewis. Here’s an example - https://www.everyoneprint.com/ad-cloud-printing?hs_preview=JLxtHRBa-47545746667. Clicking on “Get a demo” should always bring the user to the beginning of the form. This happens on the first click, but on every next click it scrolls slightly below the start.