I've applied the table of contents (TOC) macro to create a list of links at the header 3 level. I can click on these to navigate to different sections of the page. It's really annoying though because when I click on a link and go to a section the actual header itself scrolls off the top of the page. For example, if I click in the TOC to navigate to "Section 3", the page scrolls to that section but the actual text "Section 3" is just off the page so it's not visible to the user. The text within section 3 is visible, but not the header itself. This actually makes it a really poor experience because it's not clear if you were actually taken to the right section. Any fix for this?
Confluence Version: 7.4.3
Do you have a fixed header at the top of your Confluence page?
It looks like you may need to add some scroll-padding or scroll-margin to your Global Stylesheet so that the anchor is not hidden underneath the fixed header
An example is below:
body {
scroll-padding: 100px;
scroll-margin-top: 10em;
}
Set the offset for in-page anchors links. Live demo. More info about scroll-padding
and scroll-margin
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.