Background Image on Pages and Posts

I am using the background image, I have it set so that the pages look good.
If I do not want the image to show, I just change the row to a color.
However I do not want the background image to show on post.
Is there a way with CSS to remove the background image on posts, but not pages?

Hey Ira,

Sorry, I’m not getting this. Do you mind sharing a screenshot or URL on what you are trying to achieve? You can upload it to imgur and paste the link here.

Thanks!

KC

[Content Hidden]

Hey Ira,

The CSS snippet below will hide the background image on posts only. To change the background color, just use the “Background Color” option in the customizer. Give it a try and let us know how it goes. :slight_smile:

.single-post .fl-page-content {
	background:none;
}

Thanks!

KC

I will look at it again but the code did not work. When I selected the background image under customize, placed the code into the CSS portion and brought up a post the background image was showing.

Hey Ira,

Try this CSS snippet instead.

body.single-post {
  background: none;
}

Ben

Thanks Ben that did the trick…

Awesome! Just an FYI, that snippet targets single posts’ body tag. So you can change the background to any value and it will affect all single posts. Enjoy BB! :slight_smile:

Ben

I have another CSS question for the background.
Is it possible to remove the background on the page that is used for the post page?

edcc.dodgeabullet.com/latestnews

Thanks

Hey Ira,

That should be possible. Since you’re setting that page as your Blog page under Settings > Reading, it gets a blog class added to the body tag. You can then target that class to remove the background image like so…

body.blog {
  background-image: none;
}

Ben