Jump to content

How to have a different background colour between desktop and mobile version of a specific section on a page.

Recommended Posts

Site URL: https://caper-gerbil-de7g.squarespace.com/espanol/productos

Hi

I found resources to change the background colours for the entire site, but not for just one particular page.

The page only has one section besides the header and footer sections. The background colour of that unique section is #A1C0A7. I want the section in question to have the colour #F1F7F2 on the mobile version. How can I make that change with a CSS code and can I make it without knowing the section's ID?

I tried this, but it did nothing:

section {
    background-color: #A1C0A7;
}

@media screen and (max-width: 640px) {
    section {
        background-color: #F1F7F2;
    }
}

Password is riviera

Thanks.

Edited by SergentR64
Added a password for the link.
Link to comment
  • SergentR64 changed the title to How to have a different background colour between desktop and mobile version of a specific section on a page.
  • Replies 1
  • Views 212
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.