Site logo

Archived topic

Background Colour of Archive, Blog, Search vs Blog Posts

8 replies · Started by Ian on October 26, 2022

Viewing posts 1–9 of 9

I would like to keep the background colour of Blog Posts to be grey. Running the new Query Loop to control archive template using Loop Content and now would like Archive, Blog, Search background colours to be white. Is there custom CSS that I can run for this?

I think these work for the archive and and blog sections. What about the search results section?

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

Hi there,

body.search-results would target the search results page.

You can always identify the unique tag by looking at the classes in the <body>:
https://www.screencast.com/t/vbF7hJemB

Awesome thank you Leo. May I ask if we need the #page as well?

body.search-results, body.search-results #page

Seems to work without the #page line.

May I ask if we need the #page as well?

That completely depends on what you are targetting.

If this works for you:

body.archive, body.blog, body.search-results
{
background-color: #ffffff;
}

Then you don't need #page.

You can always try both versions to see the differences.

As always, thanks Leo!

No problem :)

This archived topic is closed to new replies.