Is it possible to use inline CSS in confluence?


I am trying to change the look and feel of very few elements in a page. I don't want to go through the process of using CSS as a file and make changes to my page. Is there a way i can do it inline ie code CSS along with wiki markup ?


3 answers

I just found it. You can add CSS styles to confluence content this way:

{style} h2 {font-size: 15px; color:#006600;} {style}

But, Any styles you define within the content of a Confluence page come after Confluence's master style sheets - so any property that has already been defined by your space's theme can't be redefined. Digging around with the Web Developer Firefox Add-ons can help you figure out what's already been defined, and what can be styled.

Thanks, this is a cool trick.

You can actually use HTML macro to achieve that. You can change the CSS styles for all contents by adding !important on the styles


h2 {
font-size: 15px !important;
color:#006600 !important;

You mean to say u can wrap this code around {html} and it'll work? But the problem is {html} is restricted due to security reasons and i dont have admin privilages :( But,Thanks!

Is there a way to do it without using the html macro?

Can you do this in all versions? I'm running 3.3.1 and all I get is "Unknown macro" :(

I am not sure about that as im using 3.5

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

276 views 2 10
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