Text background color to replicate command line interface
Asked by Alex Chudacoff:

I am trying to replicate a Linux shell interface for a training document in Confluence.

I would like to copy and paste the text from the command line instead of screen-shotting it.

Is there a way to format text with a black background and white text?

See example. The picture you see is all text.

2017-03-08_0956.png  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=1449){#link_1185a01f5f24b4}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10045/1/image2017-3-9%208%3A48%3A54.png){#display_1185a01f5f24b4_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=1450){#link_1185a01f5f24b4_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10045/2/image2017-3-9%208%3A51%3A10.png){#display_1185a01f5f24b4_2}  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=1451){#link_1185a01f5f24b4_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10045/3/2017-03-08_0956.png){#display_1185a01f5f24b4_4}  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=1452){#link_1185a01f5f24b4_2}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10045/4/image2017-3-9%208%3A50%3A3.png){#display_1185a01f5f24b4_6}  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=1453){#link_1185a01f5f24b4_3}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10045/5/code.png){#display_1185a01f5f24b4_8}  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=1454){#link_1185a01f5f24b4_4}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10045/6/image2017-3-8%2015%3A55%3A28.png){#display_1185a01f5f24b4_10}


Answers:
author: Alex Chudacoff
body: Forgive me gentlemen, I am fairly new at the Confluence interface.

I am not finding "div" or "code" or "style" or "css" when I search in the macro browser.


author: Milo Test
body: Just use a Div macro with CSS styling:

image2017-3-8 14:33:57.png

Put this in the Styles field:

```
background-color: black; font-family: courier; color: white;
```

Voil?!

image2017-3-8 14:35:45.png  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=12074){#link_1185a02da550f3}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10046/1/image2017-3-8%2014%3A33%3A57.png){#display_1185a02da550f3_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Text-background-color-to-replicate-command-line-interface/qaq-p/59502?attachment-id=12075){#link_1185a02da550f3_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/10046/2/image2017-3-8%2014%3A35%3A45.png){#display_1185a02da550f3_2}

comments: author: Davin Studer
body: Or the code macro.


author: Davin Studer
body: The Code Block macro is installed by default. It should be there unless a system admin has disabled it. The DIV and CSS macros require the Content Formatting Macros add-on. It is a free add-on ... kinda. It is free for the basic html macros (div, span, css, etc.).

image2017-3-8 15:55:28.png


author: Alex Chudacoff
body: Thanks.

Yes, the Content Formatting macro is not free, I will see about getting it installed.

For the Code Block, I may be doing something wrong. Does this look right?

code.png


author: Davin Studer
body: The Content Formatting Macros are sorta free. If you install it you get some macros that are free, but others that require a license. Pretty much any of the macros that start with AUI are not free, but the html macros such as div,span,stylesheet,etc are free.

As for the code macro it is not meant to render HTML. It is meant to display the body of the macro as mono spaced text with some optional formatting such a line numbers/themes/syntax highlighting. If you click on the macro you should see an edit button. Click it.

image2017-3-9 8:48:54.png

You should then see an options panel. Change the theme to Django if you want a black background and white text.

image2017-3-9 8:51:10.png