Site logo

Archived topic

Content Block Archive Background Color

9 replies · Started by troyw on September 8, 2021

Viewing posts 1–10 of 10

Hey guys,

I'm am trying to change the background colour of my Archive Pages to black. As you will see, I am using Content Block Elements to present the posts, but cannot find how to change the Background Colour of an Archive.
For example if you look at the links below, the background is White, But I want to change it to Black. If I do this in customizer > Colors > Content it changes the whole website, but I only want to affect the Archives?

Thanks

That has worked great on most of the Archive pages Elvin, but hasn't changed the Blog Archive (News)
How can I get the /news/ background to change to black as well?

Thanks

Let's modify the selector.

Try this:

body.archive, body.archive #page, body.blog, body.blog #page {
    background-color: black;
}

I thought "News" page was an archive page when its actually the Blog index page. My bad. :D

Thanks Elvin, that's perfect.

No problem. Glad to be of any help. :D

Hey team,
Sorry about this, but I have one more page type that i need to apply the the Black Background too. Its not an Archive it is a post type, so not sure what I would add to the current code to do this.

Try this CSS:

body.archive, 
body.archive #page, 
body.blog, 
body.blog #page,
body.single-label, 
body.single-label #page {
    background-color: black;
}

Perfect, thanks Elvin.

No problem. :D

This archived topic is closed to new replies.