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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

869 views 23 12
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