Jump to content

Gallery block padding on mobile

Recommended Posts

Site URL: https://www.justinphang.com/bmw-shortfilm

Hey people,

In my website's mobile view, I would like to have my specific gallery blocks to have zero top padding for the caption, so 'Ad of the day' is sticking right below Adweek and 'editor's pick is right underneath Adage'. Is it possible?

 image.thumb.png.b65765f60bb4c0b8d0cd5f4388a04fe9.png

 

Also, can there be a left and right padding for the images in the gallery block so 'BMW Blog' doesn't touch the edge of the screen? 

 

image.thumb.png.e556fdb43b5678467beb99d7a3ef3a7a.png

 

Thanks in advance!

Learning something new everyday

Link to comment

Add to Page Settings > Advanced > Header

<style>
  @media screen and (max-width:640px) {
  .slide a {
    padding-bottom: 50% !important;
}
  }
</style>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 10/3/2020 at 4:10 PM, tuanphan said:

Add to Page Settings > Advanced > Header


<style>
  @media screen and (max-width:640px) {
  .slide a {
    padding-bottom: 50% !important;
}
  }
</style>

 

Ahh damn, I just realize this requires premium feature. Any way to do this at the generic CSS style tab?

Learning something new everyday

Link to comment
23 minutes ago, justin_phang said:

Ahh damn, I just realize this requires premium feature. Any way to do this at the generic CSS style tab?

Personal Plan: Edit Page > Add Code Block > Paste above code

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
28 minutes ago, tuanphan said:

Personal Plan: Edit Page > Add Code Block > Paste above code

Hmmm, I tried it, but it affect the other gallery block at the bottom too. Any chance I can target it instead? Also, I don't think the block of 'Featured in' is actually affected too. I did a quick mockup, hopefully its possible to get closer to this, if possible:

1146800917_IMG_9518copy.thumb.jpg.f79c881323e0ac65929755abaf2f4295.jpgThe 

The pink lines signify the left and right padding. Whereas the green line signify the padding between the image and the caption. And the blue lines signify the space between each image.

Edited by justin_phang

Learning something new everyday

Link to comment
<style>
  @media screen and (max-width:640px) {
  div#block-yui_3_17_2_1_1590750819905_12393 .slide a {
    padding-bottom: 50% !important;
}
  }
</style>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.