Site logo

Archived topic

Table of Contents Anchor Link Positions

26 replies · Started by Michael on February 3, 2020

Viewing posts 1–15 of 27

Hi David,

I've just noticed that the anchor links in my Table of Contents disappear under the menu so that part of the answer text gets obscured initially. Is there any way I can somehow offset this so that when the link in the ToC is clicked it goes directly to the H2 header and keeps it visible (if you know what I mean?)

https://reclaimdesign-383226.easywp.com/faq

Yeah! Thanks David :) I will look at that now :)

Hi David,

I've added class="smooth-scroll" to the anchor links in my ToC on this page:

https://reclaimdesign-383226.easywp.com/bespoke

The Anchors are pointing to the IDs attached to each of the H2 sub-headings running down the page, but for some reason the offset and smooth scrolling doesn't seem to be working? The Smooth Scroll option is checked in the Customizer General settings

Looks ok to me - maybe browser cache needs clearing ?

Hi David,

It seems to be cutting off the H2 title and also a couple of the lines of description below. The anchor id is attached to the H2 so my understanding was that it would go to this and be visible? From what I can see the H2 is going right to the top of the page and the menu then covers it (I've cleared the cache and it's still doing that)

Hi David, I've been messing around with this for a little while now and it's definitely not smooth scrolling for me, or allowing for any offset when it jumps to anchor ids. I've tried in Firefox and Chrome with the same result. So I must be missing something (again ;))

Hi there,

It's working as it should for me: https://www.screencast.com/t/kLEm9dmr

Our smooth scroll and sticky navigation are built to work together as the video is showing.

What happens if you use incognito mode in your browser?

Hi Tom,

That looks like it's working beautifully. Unfortunately not so for me. This is what I see (recorded on incognito page view on my laptop):

https://www.screencast.com/t/g26bX7ZGPn

It jumps to the link ID without scrolling, and the offset is not working like yours either - the header and some of the description get hidden behind the menu.

I have cleared the browser cache, WordPress cache (the Optimizer plugin is turned off), and tried in different browsers and on my phone (and Nikki's phone) but we get the same results.

As Tom and I are both seeing it work correctly, i can only assume its a local issue.
There is a possibility that your Router or ISP is caching the site. Are you able to check the site using a different network ?

Hi David I'm at a friend's house testing on their connection on my phone and the Bespoke page ToC is smooth scrolling. Weird. I'm not sure how to check caching settings on our router. But when I get home the day after tomorrow I will look into it and see what I can find on Google. Thanks both for your help and patience.

If all else fails - turn it off and on again :)

Hi David,

I'm back home and the smooth scroll is still not working on my laptop. The router has been turned on and off. Any other ideas why it's not working? Really weird. It's working on my mobile, but not my laptop. I'm running Windows 10 if that makes any difference.

Couple of things to try:

1. A different browser.
2. Disable any Browser extensions such as Ad blockers.
3. Right Click > Inspect the Page and see if any Red Errors are in the Console.

Before doing any of this make sure to clear any browser caches, and clear and disable any cache plugins.

This archived topic is closed to new replies.