Jump to content

Photo Resizing on Mobile (for blog)

Recommended Posts

Site URL: https://www.hempconnect.co.nz/recipes-1/2020/4/12/hemp-connect-vegan-hemp-cheese

We are having trouble figuring out how to adjust our Blog, Recipe and Article images so that they are fitting on mobile devices.  Desktop is fine but see in the attached photos that shows how all of the photos are cut short with the grey block.  Any help/advice in rectifying would be greatly appreciated. 

IMG_1995.PNG

IMG_1996.PNG

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

In Custom CSS, remove this code

.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster {
    height: 500px;
    position: relative
}

.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img {
    height: 500px !important;
    object-fit: cover
}

if you want to change height on desktop only, remove it & use this code

@media screen and (min-width:992px) {
.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster {
    height: 500px;
    position: relative;
}

.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img {
    height: 500px !important;
    object-fit: cover;
}
}

 

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
  • 4 weeks later...

Hi Tuan

Thanks so much for your wonderful response as we have now fixed the mobile issue with your suggestion.  The only issue now is that I have uploaded the second (replacement) code as you suggested but cannot change the height on the desktop images (example attached).

I tried changing the 500px (both) in the code you provided to 150px, 250px etc but it did not seem to adjust the height of the picture.

Would you be so kind as to advise where I am going wrong??  I have also attached a picture of the code as entered on square space.

Warm regards,

Jacob 

 

Large Banner Pic.JPG

Code as entered on website.JPG

Link to comment
On 9/25/2020 at 2:47 PM, tuanphan said:

In Custom CSS, remove this code


.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster {
    height: 500px;
    position: relative
}

.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img {
    height: 500px !important;
    object-fit: cover
}

if you want to change height on desktop only, remove it & use this code


@media screen and (min-width:992px) {
.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster {
    height: 500px;
    position: relative;
}

.collection-5d509c534f246400015f6e5c .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img,.collection-5e8fcfdd9183d768a0f7867a .sqs-block.image-block.sqs-block-image.sqs-text-ready figure.design-layout-poster img {
    height: 500px !important;
    object-fit: cover;
}
}

 

 

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.