Jump to content

Two background images on a page possible?

Recommended Posts

Site URL: https://yvonnehigginsleach.squarespace.com

I'm able to put in a different background images on different pages.  Is it possible to put two background images on one page?

see: https://yvonnehigginsleach.squarespace.com/test   (different from other pages)  using code injection:

<style>
  body {
    background-image: url(https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604e27741ef0406470db59e4/1615734644169/purple-circle.png)!important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position:  center top;
    
}

</style>

I would like to add another background image and have tried.

<style>

body {

 background-image: url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604e27741ef0406470db59e4/1615734644169/purple-circle.png), url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604f9d9748cb753cc13597fe/1615830429655/psx7.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position:  center top, left bottom;
    
}

</style>

and have tried using !important

<style>

body {

 background-image: url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604e27741ef0406470db59e4/1615734644169/purple-circle.png)!important, url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604f9d9748cb753cc13597fe/1615830429655/psx7.png) !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position:  center top, left bottom;
    
}

</style>

 

Thanks!

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

2 hours ago, Spankypod said:

Site URL: https://yvonnehigginsleach.squarespace.com

I'm able to put in a different background images on different pages.  Is it possible to put two background images on one page?

see: https://yvonnehigginsleach.squarespace.com/test   (different from other pages)  using code injection:

<style>
  body {
    background-image: url(https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604e27741ef0406470db59e4/1615734644169/purple-circle.png)!important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position:  center top;
    
}

</style>

I would like to add another background image and have tried.

<style>

body {

 background-image: url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604e27741ef0406470db59e4/1615734644169/purple-circle.png), url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604f9d9748cb753cc13597fe/1615830429655/psx7.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position:  center top, left bottom;
    
}

</style>

and have tried using !important

<style>

body {

 background-image: url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604e27741ef0406470db59e4/1615734644169/purple-circle.png)!important, url (https://static1.squarespace.com/static/602f0c5751acbf2692d802fa/t/604f9d9748cb753cc13597fe/1615830429655/psx7.png) !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position:  center top, left bottom;
    
}

</style>

 

Thanks!

If 2 image on same page, how would they display? Overlay or show/hide according to screen size?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

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.