Jump to content

Using different background on desktop and mobile

Recommended Posts

Basically , i want to use different backgrounds for the desktop view and mobile view however when i change the image in one of the it also changes the image in the other one . How can i change the background in mobile view because my image doesnt fit the mobile view, so i need to use a different one but when i do change it , both of them change 

Link to comment
  • Replies 1
  • Views 982
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

There's probably a different way to go about this but this works for me:

Duplicate the section on the desktop view. Input the new background that you would like on the new section. Take the section ids of each and input them in between the brackets. Basically the point of this code is the hide one section on desktop and the other on mobile. Hope this helps!

 @media only screen and(min-width:768px) {[mobile-data-section-id]{display:none}}

@media only screen and (max-width:767px) {[desktop-data-section-id]{display:none}}

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.