How to indent header levels in Confluence

My company has an internal Confluence wiki hosted on atlassian.com. I like to use the various header levels (Heading 1, Heading 2, Heading 3) to help make it easier to comprehend complicated technical documentations.

However, when viewing such documentation, while the headers do affect font size, they do not affect any kind of indentation. This makes it really hard to distinguish subsections, since everything is flushed left. How can I change it so that the various heading levels are indented (kind of like how it works in the Table of Contents macro)? Such as:

Heading 1 here
   Heading 2 is indented a little bit and wraps
   are also indented.

      Heading 3, same thing more indentation (and same
      wrapping behavior)

   Heading 2 again...

I suspect this is pretty easy, but I can't figure out if it's something I do on pages I create, something my Administrator does that applies to all pages ever created, etc. Thanks for your help!

3 answers

1 accepted

1 vote
Davin Studer Community Champion Oct 28, 2013

What you need to do to indent the heading and content under that heading is highlight the heading and content and then click the indent button in the toolbar. The button looks like some horizontal lines with an arrow pointing right. There is no way to automatically do this ... especially with the OnDemand version. But it can be done manually very easily.

Davin,

Neat idea! Thanks. :)

Unfortunately, you cannot indent specific content if it is not a list.

This means that you cannot indent a heading and its related content, which is weird and makes the reading of long pages a bit difficult.

Davin Studer Community Champion Dec 27, 2017

I can do it in my 6.4.2 install. Doesn't look to me like they have changed that behaviour.

Davin Studer Community Champion Dec 27, 2017

Here is a screenshot of it working.

Capture.PNG

Not in the cloud version, I believe you could also do that in the cloud in the past, so I also think this behaviour has unfortunately  changed.

Jeff,

Can you do this by customising the space's CSS?

https://confluence.atlassian.com/display/DOC/Styling+Confluence+with+CSS

Cheers.

Davin Studer Community Champion Oct 28, 2013

You can indent the header easily enough with css, but the content that goes under the header won't indent as it is not contained by the header. I think the best thing is a manual process.

Disagree with the above comment that this is best done as a manual process. A space stylesheet is a far better way to ensure automatic and consistent indentation throughout the space without users needing to remember what level of indentation to use.

It's also relatively simple to do. For example:

h2, h2 ~ *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
     margin-left: 10px !important;
 }
 h3, h3 ~ *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
     margin-left: 30px !important;
 }
 h4, h4 ~ *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
     margin-left: 50px !important;
 }
 h5, h5 ~ *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
     margin-left: 70px !important;
 }
 h6, h6 ~ *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
     margin-left: 90px !important;
 }

This indent the header alone, but the content that goes under the header won't indent as it is not contained by the header. 

It would be nice to have the chance o having

  • h1 paragraph: with indentation according to H1
  • h2 paragraph: with indentation according to H2
  • and so on...

This CSS is great and indent the header and the sub-content that goes under the header but i work with CLD version that not support custom CSS.

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
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

329 views 18 10
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