Jump to content

Code to change fixed background image?

Recommended Posts

I was currently using the following code but it seems Squarespace has updated the system and now its no longer working. Is there any updated code to allows a fixed background image across the site? Thanks

 

previous code:

 

body::before {
  background-image: url('https://static1.squarespace.com/static/62c818c4083b157210b8b044/t/62c818e4083b157210b8b3d5/1656462056429/IMG_9942+6.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: '';
  height: 100%;
  opacity: .2;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: -10;
}

.page-section,
.page-section .section-background {
  background-color: transparent !important;
}
 

Edited by TLCDesign
Link to comment
  • Replies 4
  • Views 254
  • Created
  • Last Reply

Top Posters In This Topic

15 hours ago, TLCDesign said:

I was currently using the following code but it seems Squarespace has updated the system and now its no longer working. Is there any updated code to allows a fixed background image across the site? Thanks

 

previous code:

 

body::before {
  background-image: url('https://static1.squarespace.com/static/62c818c4083b157210b8b044/t/62c818e4083b157210b8b3d5/1656462056429/IMG_9942+6.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: '';
  height: 100%;
  opacity: .2;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: -10;
}

.page-section,
.page-section .section-background {
  background-color: transparent !important;
}
 

Can you share your site with the protected password so I can take a look?

Edited by Beyondspace

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
On 11/22/2022 at 1:52 AM, TLCDesign said:

Change this code

.page-section,
.page-section .section-background {
  background-color: transparent !important;
}

to this

.page-section,
.page-section .section-background, .section-border {
  background-color: transparent !important;
}

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 11/23/2022 at 8:10 AM, tuanphan said:

Change this code

.page-section,
.page-section .section-background {
  background-color: transparent !important;
}

to this

.page-section,
.page-section .section-background, .section-border {
  background-color: transparent !important;
}

 

it worked!! 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.