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
  • Views 614
  • Created
  • Last Reply
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?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.