DIV with Custom Style Doesn't work on the Page, but works in preview


I am using Confluence OnDemand.

I have a DIV container (which holds some text and a TOC), with a custom CSS Style, set to "position:fixed".

In the page Preview, the DIV and the text is working fine, it stays fixed in place with the page, if you scroll down.

But when I Publish the page and open it, fixed positioning DOESN'T work. If i scroll down, the text scrolls away.

Any suggestions? 



I used the guide from Mick Davidson from this post to do the whole thing:




1 answer

1 vote


Can you show us where exactly you added the container, and what it contains in terms of CSS? Is there any other CSS within the container that are working or are not working?

I suspect it may be due to the New Look Confluence, but I'd like to test out a few things.

Kind Regards,

Having the same issue Shannon!

Here is my CSS.


position: fixed;

z-index: 4;



top: 50%;

left: 50%; }


Whatever image I load into this does not work the same in preview and when published. 

Having the same issue. Works in Preview but not in Published mode. There are a couple other reports @ https://community.atlassian.com/t5/Questions-for-Confluence/Floating-TOC-in-the-right-column/qaq-p/106867#U895078

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

895 views 45 7
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you