Padding below the noformat macro

I find the lack of padding below the noformat macro in Confluence 4 to be bothersome. When I create a bulleted or numbered list, and the list items contain noformat macros, the list comes out looking very compressed and unprofessional (in my opinion). This was not an issue in Confluence 3 because there seemed to be some padding at the bottom of the macro, so I could insert a macro by editing the page in wiki markup, like so:

# This is a list item
# This is another list item
This is some unformatted text
# This is the next list item

In Confluence 4, I can't edit the wiki markup of the page (grrrr!). In the WYSIWYG editor, there appears to be some padding between the macro and the line below it, but when the page is previewed or saved, there is no padding at all. If I insert a single blank line between the macro and the line below it using Shift-Enter, this creates an inexplicably huge gap (much larger than one single line of text) when the page is saved. I just can't win.

Is there any way to edit the noformat macro definition and add padding to the bottom? Or is there some other way I can accomplish this?


1 answer

1 accepted

0 votes
Answer accepted

Hi Dave,

I've been playing around with this and you can add padding by overriding the CSS with:

li .preformatted.panel {
	margin-bottom: 10px;

To override the CSS you can either enter the CSS directly on the page(s) containing the list by enabling the HTML macro (Browse -> Confluence Admin -> Plugins -> Confluence HTML Macros -> Manage Plugin Modules) and enclose the above CSS with <style> </style> tags, or you can include the CSS on every page by default by selecting Browse -> Confluence Admin -> Look and Feel -> Custom HTML and inserting the above enclosed in <style> </style> tags in the "At end of HEAD" section.

Hope that's of some help?


PS. It has to be done with CSS as I tried using the new Confluence Source Editor and there are no extra HTML tags being entered that could be removed, it's the default Confluence CSS that's setting margins to 0px and causing the spacing between the list item and the {noformat} macro to be removed.

Thanks, Andrew. This is exactly what I needed. I added it globally to the Custom HTML and it works perfectly on every page.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,159 views 2 13
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