Jump to content

Different background colors for several different pages

Recommended Posts

Hi everyone - my team and I are in the process of building a new website for our online magazine, and we're a little stuck. Since we're issue-based, and all the issues are themed, we're creating a separate blog page for each issue. We're hoping to give each issue, along with all of its articles, a unique background color. I've done a lot of googling and custom CSSing, and I've created a color theme with a transparent background so that the custom color will show through, but nothing seems to be working. Any help would be greatly appreciated! The site isn't published yet, but I'm happy to provide screenshots/explain more of what I've tried already.

Link to comment

Link to the site and just share a password.

Also, at a guess, try creating a code block in each blog post (anywhere is fine, I'd probably go for the end for simplicity) and paste this into it, changing the two values for text and background.

<style>
/*Squareskills - Change Blog Post Colours*/
article .entry {
  background: YOURBACKGROUNDCOLOR;
  color: YOURTEXTCOLOUR;
}
article .entry :is(h1,h2,h3,h4) {
  color: YOURHEADINGTEXTCOLOUR!important;
}
</style>

Again, at a guess, I have a feeling headings need separate targeting but if you want uniform colours you can likely just use !important in the first bit of CSS and skip the bottom half.

Work With Me 🖥️💻📱

Please remember to tag me so that I get a notification and respond to your help requests.

If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly.

You can also thank me or make requests by buying me a coffee . (Caffeine fuels me to take more requests)

For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials)

For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩

Some links may be affiliate/referral links.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.