Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

How to add screensize parameters around a data-section-id



Site URL: https://star-fennel-h9p3.squarespace.com/


I have a section that is multicolored. It's perfect on mobile and desktop. But I want to change it to a single color on tablet only.

Here is my current css:

[data-section-id="60b93ddcc8f89f0d0d45b26e"] .section-background {background: linear-gradient(270deg, #DFCCBE 500px, #F8F5F2 80px);}


My question is, how do I add tablet parameters?

ie: @media screen and (max-width:1024px) and (min-width:768px)


I tried this, but of course - got an error

@media screen and (max-width:1024px) and (min-width:768px)
.section-background {background-color: #DFCCBE;}


Site: https://star-fennel-h9p3.squarespace.com/

Password: website2021

Link to comment
  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0


You're incredibly close with the code you shared to having a working solution. The reason it isn't working is because there are no opening and closing "{}" following the code for your @media screen query, so the fix is simple.

@media screen and (max-width:1024px) and (min-width:768px) {
.section-background {background-color: #DFCCBE;}} 

Hope this helps!



Link to comment
  • 0
11 hours ago, LaurelB said:

Thanks @Wolfsilon!  But for some reason it still didn't work to change the background to a single color!

Any ideas?

I tried adding !important;  but still nothing!


Hi. Where is this section on homepage?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care - Learn CSS - Custom Popup - Testimonial Slider

I'm Tuan, blogger/owner of a free library for children in Vietnam. Helping the community is a hobby. Contact me via email.

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