Jump to content

Side by side images generates vertical unwanted vertical padding when on mobile

Go to solution Solved by tuanphan,

Recommended Posts

Posted (edited)

Hi, I hope anyone knows how to fix it.
I'm using a "blog" page to feature projects.
On wide screens, I use maybe 3 or 2 images in the same row with thin white borders. When converted to small screens/mobile, Squarespace repositions the images, creating a weird vertical spacing between them. I would love the mobile version to keep the same spacing between images, even if it changes its scale and position.
https://www.beeldmotion.com/work/sportv-rebrand

Best!

frame_mobile.png

frame_desktop.png

Edited by duducampos
  • duducampos changed the title to Side by side images generates vertical unwanted vertical padding when on mobile
  • Solution
Posted

You can add this code to Website Tools (under Not Linked) > Custom CSS to fix problem

/* Blog content image block space */
@media screen and (max-width:767px) {
div.blog-item-content-wrapper .image-block.sqs-block, div.blog-item-content-wrapper .image-block.sqs-block:first-child {
    padding-top: 2px !important;
    padding-bottom: 2px !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.