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 vote


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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

87 views 0 6
Read article

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