Hi,

I have a few adjustments I'd like to make to my blog. I like where everything is, I just want to change the background.

I would like a gray background, which I know how to do, but I also want a white background behind my actual posts, so that I could keep the text colour black.

Does this make sense? Can someone help? Am I posting in the right place?

Thanks in advance,
Kyle

Dani AI

Generated

Useful, practical follow-up to that builds on 's point: yes — set the overall page to a gray tone and set the post container to white. The missing detail in the replies is how and where to apply the change in Blogger (or similar hosted themes) and how to find the exact selector your template uses.

Quick steps to apply safely:

  • Inspect the post area in your browser (right‑click the post text and choose "Inspect" or "Inspect Element") to find the element that wraps each post and note its class or id.
  • In Blogger go to Theme > Customize > Advanced > Add CSS (or Theme > Edit HTML if you prefer editing the template). If those are locked, add a Layout gadget: Add a Gadget > HTML/JavaScript and paste a small style block there.
  • Paste CSS like the example below, but replace the sample selector (.post) with the actual selector you found in the inspector.
/* page background */
html, body {
  background: #efefef;
}

/* post container — replace .post with your template's post selector */
.post {
  background: #ffffff;
  color: #000000;
  padding: 16px;
  margin: 12px auto;
  max-width: 760px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

Troubleshooting and cautions: back up the template before editing. If your change doesn't show, check for more specific selectors in the template (sometimes the wrapper, a child element, or an inline style is overriding you). Use more specific selectors rather than immediately resorting to !important. If a background image is used by the theme, you may also need to remove or override that rule. This expands on 's answer by giving a concrete workflow you can apply right now.

Recommended Answers

All 3 Replies

Hi kstorm, and welcome to Daniweb.

What you want to do is all possible, with the correct css values. The grey color will come in the background of the body section, and the div that is defining your post or text area, you set the background white.

Post the url to your blog, and I will look at your source to help you find the correct places to change background, if what I say here does not make sense to you.

Hi happygeek,

It does make complete sense to me, but unfortunately, I don't know how to create that code. Thank you so much for your quick response and your help, here is the link to my blog.

Kyle

Hi kstorm

First, happygeek will not be very happy if you call me by his name. He is a legend on this forum, I think. :)

I see now that your blog is one of those shared ones, where they allow you to customize some parts of it.

Now, you should look and see if you can find in the stylesheet you have access to, something like this:

<div class="post-body entry-content">

That looks to me like the place where you should be able to insert a background color, using this:

background-color: #000000;

where #000000 is the color of the background, and this example is black.

I think you will only be able to do that, if that part of the css file you have access to. Maybe, someone here who have experience with blogspot blogs customizing, will know better how they work, and what is allowed to customize, and what not.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.