How to increase the spacing between Table of Contents' entries

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The Table of Contents macro provides a tree of the headings of a page. The small spacing between each entry can make it harder to read depending on the amount and length of the headings used.

Environment

Confluence Server or Data Center (any version)

Solution

The spacing between Table of Contents' entries can be increased using a CSS customization. To apply the customization to a single space, follow these steps:

  1. Go to the General Configuration > Stylesheet

  2. Choose Edit

  3. Paste the CSS code below, which you can further adapt to your needs:

    1 2 3 a.toc-link{ line-height: 35px; }
  4. Save the changes and check a page with a Table of Contents macro to confirm the changes

Updated on February 14, 2025

Still need help?

The Atlassian Community is here for you.