Jump to content

How to adjust picture width to make picture smaller on mobile

Recommended Posts

Site URL: https://matey.app

Hi, I'm trying to figure out how to make my iPhone pictures smaller on mobile so they aren't full-width. I want them to appear smaller like the Apple website example attached. I don't want to change the padding of the underlying text, just the iPhone. Does anyone know how to do this? My site is on Squarespace 7.1.

Thanks!

IMG_9155.jpg

IMG_9156.PNG

Link to comment
  • Replies 4
  • Views 719
  • Created
  • Last Reply

New code

/* resize image on mobile */
@media screen and (max-width:767px) {
.homepage .image-inset {
    width: 70%;
    margin: 0 auto;
}
/* Exclude app icon */
div#block-yui_3_17_2_1_1595994896451_10296 .image-inset {
    width: 100% !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!)

Link to comment
  • 3 weeks later...

@tuanphan Thanks, looks good! Is there a way to exclude poster image blocks? Poster images are currently affected, causing the image to display incorrectly like the screenshot below. Do you also know how to apply the same border-radius of 30px to poster image blocks on mobile? It looks like the corner radius goes away on the phone. 

IMG_9721.jpg

IMG_9736.jpg

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.