Centering a page in the default theme

We're using the default (as opposed to the documentation) theme for all our spaces. We like the sidebar provided by the default theme and would prefer to keep it. However, one thing we really like better in the documentation theme is the way the pages appear to be limited in width and centered in the page window.

So with that in mind, here's my question: Is there a way in CSS (or other stylesheets) to limit the width and center the page, but otherwise keep the default theme (and do it on a space by space basis)? I was able to modify the space CSS to limit the width, but the page is left-justified, with a big gray bar running down the right side of the screen when on a bigger monitor.



1 answer

0 votes


You should be able to accomplish this in CSS by adding auto margins to the left and right of the element being limited in width. Example:

      margin-left: auto;
      margin-right: auto;
      width: 70%;


Stephen Brannen | Confluence Support

Thanks Stephen - but do you have any idea what the element would be? I haven't been able to figure it out on the default theme. For the documentation theme, it's "main"... But that doesn't work on the default theme.

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 ...

780 views 33 5
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