Jump to content

Can I get help creating a snippet to have unique images on the mobile version of the website and desktop version?

Recommended Posts

  • Replies 1
  • Views 113
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You can use a media query to hide and display different image blocks on mobile/desktop, something like this:

// Blocks to hide on desktop
@media only screen and (min-width:750px) {
  #block-yui_3_17_2_1_1662597656415_29097 {
    display:none;
  }
}
// Blocks to hide on mobile
@media only screen and (max-width:750px) {
  #block-yui_3_17_2_1_1661988335368_69640 {
    display:none;
  }
}

Add new block IDs separated with commas as you need more instances.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.