Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using CSS in Confluence 4.1

Chris Maynard May 17, 2012

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 at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
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.

0 votes
Chris Maynard May 20, 2012

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

Cheers,

Chris

0 votes
CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 17, 2012

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events