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
\\
{noformat}
This is some unformatted text
{noformat}
\\
# 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?

Thanks.

1 answer

1 accepted

This widget could not be displayed.

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?

Andrew.

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
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

473 views 6 6
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