How to change the background color or add an image?

(Rahul Banker) #1

I tried browsing through settings and everything but couldn’t find anything. Is it something to do with css, if yes, how?

(cpradio) #2


And yes, it would be via CSS

(Rahul Banker) #3

any help with the css?

(David Maxwell) #4

It would be something like:

html {
color: #abc;
background: #def url(/uploads/default/51/testme.jpg);
background-size: cover;
background-position: top;
background-attachment: fixed;

It’s the background: portion - #def is the color, and url() is the background image. Standard css.

CSS background-image and other style options remove on refresh in admin
(Robin Ward) #5

Also if you have a recently updated discourse, we now support uploading background images and logos for categories :slight_smile: So if you want to make them specific to sections of the site, edit the category and click the “Images” tab.

(Rahul Banker) #6

just updated to the newest version, going to check that out! Sounds interesting. All the best to you guys, wonderful job.

(Egor Lyfar) #7

Thank you for this css, but what I have now is a transparent background in posts with the image background which appears behind it, so it is unreadable. Where I can add a css of add color for the background of a post itself?

(David Maxwell) #8

You’d just have to add a background-color to the css for .topic-body