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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Goff-Dupont
Published 4 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

54 views 2 3
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