Using CSS in Confluence 4.1

I have just started evaluating Confluence and I am having trouble in understanding how Confluence uses CSS.

I can use the Space Adminstrator page to access the CSS and adjust the Heading styles, but how do I add a style to the CSS so that it shows up in the style selection drop-down on the edit page? Any new styles I add do not appear anywhere.

Thanks,

Chris

3 answers

1 vote
David Simpson Community Champion May 17, 2012

If for example your custom CSS does this:

#com-atlassian-confluence strong { color: limegreen; }

You'll need to update the style in the TinyMCE-based editor iframe too for your style to be seen when editing.

This can be achieve doing this in the same stylesheet:

#tinymce strong { color: limegreen; }

The #tinymce selector increases the specificity so that the style is not overridden.

Hi,

Your new CSS styles are available to use in page elements which support CSS parameters (like deck/cards, roundrect, etc) but they won't appear in the drop-down list of styles.

If you want other page authors to be aware of the new styles, you could create a page template which uses them.

I'm sure there will be an existing issue raised on this in the public Jira project for Confluence, as its been a long-standing issue.

Regards,

Charles

Thanks for the answers guys. I will try out your suggestions.

Cheers,

Chris

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

808 views 38 5
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