Fixed TOC working in preview but not when published

Dustin DeCoursey
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 20, 2019

I'm fairly new to Confluence, but I've found a number of topics on the same subject. Unfortunately none of them appear to have the solution for the problem. 

I have a page setup with 2 tabs, on the left is actual content and on the right is just a TOC with CSS, Div and HTML comment. 

I'm actually not even certain the HTML is having any affect here, but it still functions in the preview just fine, so I've left it alone. 

Confluence_TOCFixed.png

I've reviewed a number of articles including this one that seems to be having the same issue as the well as the one they point to inside of that article. Perhaps I'm missing the obvious but any help is appreciated. 

 

https://community.atlassian.com/t5/Confluence-questions/DIV-with-Custom-Style-Doesn-t-work-on-the-Page-but-works-in/qaq-p/634747

2 answers

0 votes
Zak Laughton
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2019

That is strange that you are able to see the table of contents in the preview, but not in the published page. I tried to reproduce this behavior, but was unable to. When I put a table of contents in the right column of a page in a div with property "position: fixed", it appeared normally on a page.

My guess is that on your page, the position: fixed property is moving the table of contents to a location it can't be viewed.

You have a number of macros here though, and I think a good place to start is to start ruling out certain macros and seeing what does and does not impact the issue. Then we can focus on testing only the related macros.

  • Keeping everything else the same, do you see the same issue if you replace the table of contents with plain text?
  • Keeping everything else the same, do you see the same issue if you remove the "style" macro?
  • Keeping everything else the same, do you see the same issue if you delete the text in the left column?
  • I'd also like to see if it's visible if you force the div into a corner. Are you able to see the table of contents in the top right of the published page if you put the following in the Style macro?
    • .fixedPosition { position: fixed; top: 0; right: 0; }

– Zak

0 votes
Dustin DeCoursey
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 20, 2019

I've removed the HTML, still functions the way I expect in the preview but not when published. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events