It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bug? Linking to an anchor behaves differently when linking from another page?

Linking to an anchor (created using the Anchor macro) on the same page works just fine.

However, when you link to that anchor from another page, it links to a location a few lines below where the anchor is located.  

I.e. it correctly goes to the page, and to the correct location, and then immediately scrolls down a few lines.   If the anchors is placed just above a header, it scrolls to the first paragraph below the header.   If the anchor is placed just above a paragraph, it scrolls to the third line of the paragraph.

Has anyone else noticed this?  Is there any solution (other than placing the anchor a few lines _above_ where you want it to link to)?

3 answers

We see similar behavior when linking from a figure to a place on the same place as the figure.

I have noticed this behavior too and I don't know why it happens. It can confuse users because they might not land where they expect.

I have seen if a web page is short, then the browser will stop at the end of the page, regardless of where the anchor is. This can result in the linked-to anchor appearing in the middle of the page instead of at the top as expected.

I have a similar issue. The anchor is at the top of the page. When one clicks on a link pointed to it further down in the document, The page scrolls up to about 4 lines below the Anchor position. One has to manually scroll the rest of the way up.

The only work around I have found is to add 3 blank lines between the top anchor and the table of contents macro. So, the full table of contents will totally show up when the below link is clicked.

Any thoughts on what would cause the link to not scroll completely up to the anchor location?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

327 views 9 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you