Jump to content

Custom code to have different images on the mobile version

Recommended Posts

  • Replies 1
  • Views 426
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Posted

I think you can use Gallery Block, set 4 items/row on desktop, then we can use CSS to change it to 2 items/row on mobile.

But if you still want to use Image, use this code to Website Tools > Custom CSS

@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1726518364200_34409 {
    background-image: url(https://content.invisioncic.com/p289038/monthly_2024_10/Imuaclientlogoswitch.thumb.jpg.06b011f7ca192e4c58fb4e53e7e752f5.jpg);
    background-size: cover;
    background-repeat: no-repeat;
}
div#block-yui_3_17_2_1_1726518364200_34409 img {
    visibility: hidden !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.