Jump to content

Adding a Background Image to just one page in Squarespace 7.0

Recommended Posts

Hey there! This feels like it should be easy but I'm not finding anything online to help me out with it. I'm using Squarespace 7.0 and would like to add a background image to just one page. Please let me know if I'm not being clear enough. Thanks!

My research has led me to this scrap of code that has allowed me add a background image, but to every page on my site. Maybe this is a good jumping off point? I don't know. I'm a coding novice 🙂
 

body {
  background-image: url(https://example.com/image.jpg);
}

 

Link to comment
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

On 4/9/2023 at 4:14 AM, liampetro said:

Absolutely! Thanks for the response!

https://www.liampietraszewski.com

Which page? If homepage, add this to Design > Custom CSS

body#collection-616dda9fae933429904c8b34 {
    background-image: url(https://cdn.pixabay.com/photo/2023/03/06/14/58/iguana-7833655_640.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Much appreciated!! Let's say I don't want to do this to the homepage? How might this change the code above? PLUS, depending on which page I'd want to apply this change to, would that change the lines of code as well?

Link to comment
On 4/12/2023 at 11:21 PM, liampetro said:

Much appreciated!! Let's say I don't want to do this to the homepage? How might this change the code above? PLUS, depending on which page I'd want to apply this change to, would that change the lines of code as well?

Two way to apply code on one page

Option 1. You can edit that page > Add a Code Block (anywhere) > Then paste this code into Code Block

<style>
  body {
    background-image: url(https://cdn.pixabay.com/photo/2023/03/06/14/58/iguana-7833655_640.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
</style>

Option 2. Just replace 

body#collection-616dda9fae933429904c8b34

with new page id

See this guide to find how to find page id

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.