Jump to content

Body Content Background White, with Site-Wide Image Background

Recommended Posts

I'm using the following code for a site-wide background image:

// Site-Wide Background Image //
.section-background, .page-section, .section-border {
    background: transparent !important;
}
body {
   background-image: url(https://static1.squarespace.com/static/641264c7edbfe5006e0ee4f9/t/64421ac128aa2229594b6b76/1682053832280/site-background-image-7M.jpg);
   background-size: cover;
   background-repeat: no-repeat;
   background-position: center center;
   background-attachment: fixed;
   background-color: transparent !important;
}

I would like to keep this background image as-is, but make the body content white for all site pages.

Any help would be appreciated.

 

Link to comment
  • Replies 10
  • Views 272
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

The only way I know to do it is to add the background to each block with the following in the Custom CSS section, but you'd have to list every block in every blog post, which is obviously not awesome. @tuanphan might know a better way.

#block-ID1, #block-ID2, #block-ID3, ... {
     background: #ffffff;
}

Link to comment

I don't think that will work for sections. I suspect a better solution would be to use HTML to set the background color of the appropriate div for the page as a whole, but I'm not sure how to do that with a blog page off the top of my head. I'd have to play around with it. Hopefully someone here can steer you in the right direction.

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.