Forums

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

How to create a sticky ToC?

Tim
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 16, 2022

I am using the Three column section with sidebars. On the left sidebar, I have a custom Div in which I put a ToC and a children display macro. 

Also, I created a custom stylesheet with following styles:

.toc-btf { 
position: -webkit-sticky;
position: sticky;
top: 200px;
}

I gave the div the classname but the code didn't work. 

I tried using position: fixed and it worked. But since I am creating a template, I can't use this workaround since using the fixed attribute, the page becomes vulnerable to breaking the layout. Because of that, I am searching ofr a way to make sticky work.

 

I can't use custom HTML since there is no macro and I can't get one.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events