Extra padding with Pagetree macro

I have noticed that when using the pagetree macro, the rendered menu is left-padded with a large number of empty space. This can be even seen in the documentation for the pagetree macro available at https://confluence.atlassian.com/display/CONF33/Pagetree+Macro.

As you can see, the provided examples all include a hefty left-padding. It's obviously possible to somehow remove this padding given that the left navigation bar within the Confluence documentation itself does not contain said padding.

How do I go about removing this extra padding? Is there a parameter to the macro that I can use (although, documentation doesn't show anything) or a particular CSS style I can override in order to remove this excess padding?

1 answer

1 accepted

The padding in the Doc Theme is set to -10px padding via this bit of CSS:

#splitter-sidebar .plugin_pagetree {
margin-left: -10px;
}

If you want to change the padding for all Page Tree macros in a space or in the site, you can add this CSS to either a space-level or global stylesheet (see Styling Confluence with CSS for details):

.plugin_pagetree {
margin-left: -20px;
}

This will not overwrite the Doc Theme's CSS because of the additional #splitter-sidebar definition. Also, when I used -20px in a local instance, it left a small indent for the Page Tree when lining it up with a block of Paragraph text. Using -30px put it fairly flush with the text blocks if you want that instead.

Thank you, this answer solves the issue perfectly.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Goff-Dupont
Published 6 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

71 views 2 3
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