How to Change Background Color?

I am trying to figure out how to change the background color of Casper Theme posts (from white to a dull cream-color). I was able to do it for the home page using the following CSS, but this didn’t transfer to posts:

body {
background-color: #e8e0d0 !important;
}

I’m confident the solution will be simple.

I would suggest the following code:

body,
.page-template .site-main, 
.post-template .site-main {
  background-color: #e8e0d0;
}

Thank you Ahmad. I just tried it, but it doesn’t look so good. Do you know the CSS for changing the color in the text box itself on posts, so that I can change the white to a color similar to the background color?

https://langelliott.ghost.io/welcome/

You are welcome!

Yea, you can try this one:

.post-full-content { }

That does indeed work! How do you figure out the code? Do you use a browser to inspect elements? I’ve been unable to get that to work using Chrome.

Exactly, I use Chrome dev tools to inspect the element:

You can click the Inspect Element button (arrow icon on the top left) and then select any page item to show the CSS properties on the right side.

Thanks Ahmad. I FINALLY figured out how to use Chrome to reveal CSS. I only had to click the icon to the left of Elements (see attached). Without doing that, I was completely unable to reveal the code.

Screen Shot 2019-07-01 at 1.00.52 PM.png

1 Like