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 78
  • 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 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

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.