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

This widget could not be displayed.
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.

This widget could not be displayed.

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

This widget could not be displayed.

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 yesterday 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...

147 views 1 4
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