Customize inline code block background and font colors in all pages and spaces


I want to have inline code blocks (called monospaced text in editor) to have background color and font color different from default. I need it on css level, so it will be applied to all pages and spaces (unless customized otherwise in editor).

I think it would require adding custom css snippet but I can't find where I should put it. Css like:

code {
  background-color: #e67300;
  color: #333;

1 answer

Hi Alex,

Unfortunately with OnDemand you cannot add your own custom CSS as all of the entry points that would allow you to do this in the download version (HTML Macro, User Macro, Custom Themes, Custom HTML, Space Layout, etc.) are restricted with OnDemand to avoid potential security or stability problems that custom HTML/CSS/Javascript could cause.

Only think I can think of is if one of the pre-defined themes for the Code Macro ( is close to what you want then encourage users to use that particular formatting when entering code blocks.

Far from ideal for what you want to do I know, but is this of some help?


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

1,039 views 23 13
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