Jump to content

Change background colour

Go to solution Solved by huxleymann,

Recommended Posts

Hello Squarespace enthusiasts! 

In desperate need of help! 

Getting really frustrated with this line of code that all of a sudden isn't working. 

It's a simple split background colour. Customised for mobile as well. 

Code below that was working fine and now all of a sudden it isn't... 

https://www.studiohuxley.co.uk/

Password: hello 

Would really appreciate any help 🙂

Target section is on the home page. Image attached. 


//Section split colour background home page services - Start//

section[data-section-id="6347fe9e12a5c627d0cbbb5a"] {
 .section-background {
    margin-bottom: 22%;
    position: absolute;
  }
  & {
      background-color: #F6F4F9!important;
  }
}

@media only screen and (max-width: 600px) {
  section[data-section-id="6347fe9e12a5c627d0cbbb5a"] {
     .section-background {
    margin-bottom: 220%;
    position: absolute;
  }
  & {
      background-color: #F6F4F9!important;
  }
}
  }

Screenshot 2022-11-14 at 14.12.40.png

Edited by huxleymann
Spelling error
Link to comment
51 minutes ago, huxleymann said:

Hello Squarespace enthusiasts! 

In desperate need of help! 

Getting really frustrated with this line of code that all of a sudden isn't working. 

It's a simple split background colour. Customised for mobile as well. 

Code below that was working fine and now all of a sudden it isn't... 

https://www.studiohuxley.co.uk/

Password: hello 

Would really appreciate any help 🙂

Target section is on the home page. Image attached. 


//Section split colour background home page services - Start//

section[data-section-id="6347fe9e12a5c627d0cbbb5a"] {
 .section-background {
    margin-bottom: 22%;
    position: absolute;
  }
  & {
      background-color: #F6F4F9!important;
  }
}

@media only screen and (max-width: 600px) {
  section[data-section-id="6347fe9e12a5c627d0cbbb5a"] {
     .section-background {
    margin-bottom: 220%;
    position: absolute;
  }
  & {
      background-color: #F6F4F9!important;
  }
}
  }

Screenshot 2022-11-14 at 14.12.40.png

Try

section[data-section-id="6347fe9e12a5c627d0cbbb5a"].page-section .section-border {
  background-color: #F6F4F9!important;
}

@media only screen and (max-width: 600px) {
  section[data-section-id="6347fe9e12a5c627d0cbbb5a"].page-section .section-border {
    background-color: #F6F4F9!important;
  }
}

 

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
55 minutes ago, huxleymann said:

Getting really frustrated with this line of code that all of a sudden isn't working. 

It's a simple split background colour.

Squarespace made a change to sections last week (adding a section-border class) and it appears to have caused some unexpected issues. See this post:

 

 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • Solution

@paul2009

Thanks Paul!

You confirmed my suspicions. It all happened on Friday across my clients sites. So tedious ha 

This amended code now seems to be working. 

//Section split colour background home page services - Start//

section[data-section-id="6347fe9e12a5c627d0cbbb5a"] .section-background {
    background-color: #F6F4F9!important;
  margin-bottom: 25%;
}

@media only screen and (max-width: 600px){
section[data-section-id="6347fe9e12a5c627d0cbbb5a"] .section-background {
    background-color: #F6F4F9!important;
  margin-bottom: 225%;
  }}

//Section split colour background home page services - End//

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.