Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence : issue with Anchor links hidden by breadcrumb navigation bar

Adrien
Contributor
January 29, 2020

Hello, I’m running Confluence server 7.0.1 and I noticed an issue with Anchor links.

When clicking on a link pointing to an anchor (on the same page or on another page), the first lines where the anchor was set are hidden behind the breadcrumb navigation bar.

 

So we have the impression that the anchor link does not point to the exact position where it was set, but to the second or third line below.

This is often confusing when pointing to titles or sections, because we don’t know where we were pointed to because we cannot read the title.

 

However when scrolling once down and up again, the breadcrumb navigation bar disapears and we can finally see the lines that were hidden before.

And they correspond to the place / title where the anchor was set, so we know the link works properly.

 

Is there any tips on how to solve this ?

Thank you in advance.

 

Example when clicking on a link to an anchor (Title where anchor is set is not visible) :

image.png

When scrolling once up then once down, breadcrumb navigation bar disapears and title can be seen :

image.png

 

Also, if the link and anchor are on the same page I noticed this issue only occurs when the anchor is located somewhere above the link (which is most of the time in my case).

If anchor is located somewhere below the link, the breadcrumb navigation bar dissapears by default so all the text is correctly visible.

 

The issue is even more annoying when pointing from another page to the anchor. In that case, it seems the global menu bar hidding the Title where the anchor was set : 

image.png

2 answers

4 votes
Adrien
Contributor
January 29, 2020

[EDIT] added more description in content of ticket instead of this answer

Juergen TIEDEMANN
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2020

I have the same problem and would appreciate a quick fix.

Hayden
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 5, 2020

Sigh, exactly this, what is this, it is sooooooo frustrating that something like this doesn't work as intended.

But yeah, any fixes incoming on this?

David Ball
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 26, 2020

@Adrien , I'd like to follow this. Please could you post a link to the ticket.

b_mort
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 17, 2020

Just came across this very issue and a quick search brought me here- would love a quick fix or work around to this as well! 

Sanjay Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 18, 2020

+ 1 vote. Very frustrating.

A very hacky workaround is to put a line break for every header (or anchor title) in your page. That way it does work as the anchor goes to the empty line which is hidden by the page header and then you can see the anchor title just below it.

As I said very hacky but works. I can't believe this is not bothering Atlassian :)

antoine.weekers January 22, 2021

This is indeed a frustrating issue. the work-around is quite obvious, but also disappointing. Especially when linking to items in a table. I now need to point to the row above; which obviously gives issues when deleting or adding rows.

A quick fix would be highly appreciated indeed.

0 votes
Roger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 13, 2023

If you have admin rights then you can add your own styling to fix this issue:
https://confluence.atlassian.com/doc/styling-confluence-with-css-166528400.html

If you do not have these rights or your admin wont't fix it, then you you can use a browser extension to edit the styling of the site just for yourself.

I used Tampermonkey to add some extra whitespace to the page, using the CSS scroll-margin-top property.

A value of 18rem worked for me.

Make sure you add your own domain to the @[deleted] property or this code will not run on your instance of Confluence.

There are other browser extensions that allow you to add custom CSS to a webpage without using all this JavaScript. In that case just add the scroll-margin-top property to the body element.

// ==UserScript==
// @name Make hidden page achors visible below page header
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://YOUR_NAME.atlassian.net/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net
// @run-at document-start
// @grant none
// ==/UserScript==

(function() {
'use strict';

const css = `
body {
scroll-margin-top: 18rem;
}
`;

var element = document.createElement('style');
element.setAttribute('type', 'text/css');

if ('textContent' in element) {
element.textContent = css;
} else {
element.styleSheet.cssText = css;
}

document.getElementsByTagName('head')[0].appendChild(element);

})();

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events