SOLVED: Anchor links jumping too far

Having some trouble with anchor links.

When on the same page they work work great, but when not on the same page they go too far down.

I’ve tested on Chrome and Safari and on Safari it’s almost like it goes to the right place, then decides to just scroll another 500px or so.

I tried adding scroll-margin-top: 500px; but then that messes the link up if already on that page.

Hi Seamus,
Welcome to the forum, and thanks so much for your report!

A link would be much more helpful than a video :slight_smile: Can you provide me with the link to the page?

Best regards,
timmse

Hi Timmse, thanks for helping with this.

This is my first site with Bricks and it’s been a learning curve but great fun, I’m a convert for sure!

Here’s the link:

https://staging.riedesign.org/
pass: brickstest

Cheers,
Seamus

Hey Seamus,
Thanks for the link, but every page except for the homepage looks completely broken, and, therefore, makes it impossible to debug the scrolling position :frowning:

Can you take a look and fix it?

1 Like

Hi Stefan,

That’s fixed now, a caching issue.

Cheers,
Seamus

Hey,
I guess it’s because the height of your page header changes “dynamically”. This changes the scroll position, and therefore it doesn’t fit anymore. Can you check on that?

Best regards,
timmse

Sorry for the slow reply.

Thanks Stefan not sure how I didn’t think it could be to do with the motion.page animation! With that disabled it works as expected.

Cheers,
Seamus

1 Like