Forums

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

Centering a page in the default theme

Jason Plumhoff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2014

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.

Thanks,

Jason

1 answer

0 votes
Branno
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 12, 2014

Jason,

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:

.element_being_centered{
      margin-left: auto;
      margin-right: auto;
      width: 70%;
}

Cheers,

Stephen Brannen | Confluence Support

Jason Plumhoff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2014
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
TAGS
AUG Leaders

Atlassian Community Events