Jump to content

Load only mobile version images on mobile

Recommended Posts

  • Replies 2
  • Views 140
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hey @Delta, you can use the below CSS to hide an element on desktop, you'll need to replace '#block-id' with that of your block, and can adjust the 768px value to your liking.

 

// Hide On Desktop
@media only screen and (min-width: 768px) {
#block-id {
display: none;
}

 

Squarespace Developer based in Hampshire, England

If you'd like to make a contribution for my time you can Buy Me A Coffee.

Reach out for Custom Coding - abibacon.com

Developer & Support Specialist at will-myers.com (Affiliate Link)

Link to comment

Thank you! This worked, I've moved the 'display: none;' property inside the media query and fixed the comment syntax to be appropriate for CSS. 😉

// Hide On Desktop
@media only screen and (min-width: 768px) {
  #block-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.