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;
  }
}

 

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
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: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

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.