Jump to content

Centering a Gallery Grid on Tablet

Recommended Posts

Hi, 

Thanks to this forum, I have been able to assign how many thumbnails per row display on mobile and tablet by adjusting "%", however, since it is by "%" and not by number per row, changing 9 across to 5 or 6 results in rows not having the same number of thumbnails....so I would like to at least center the grid thumbnails. Not sure if I am assigning the centering in the right place, as it's not centering.

TABLET VIEW FOR: 

https://www.no-frames.com/nf-home  > Clients section (div#block-4c0ecb71fe65b1f517d7)

*Also, not sure why video is not appearing at the top of the page on tablet and mobile

Quote

@media @tablet {
div#block-4c0ecb71fe65b1f517d7 { 
    margin-bottom: 0 !important;
}
div#block-4c0ecb71fe65b1f517d7 .slide {
    width: 20% !important;
    display: flex;
    justify-content: center;
}  
div#block-4c0ecb71fe65b1f517d7 img {
    width: 100% !important;
    height: auto !important;
    vertical-align: middle;
    display: block;
  }

 

 

Link to comment

Don't remove any code in your current code

Add this to Design > Custom CSS

/* Align clients logos on tablet */
@media screen and (max-width:900px) and (min-width:641px) {
#block-4c0ecb71fe65b1f517d7 .sqs-gallery-block-grid .sqs-gallery-design-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
div#block-4c0ecb71fe65b1f517d7 .slide {
    display: block !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

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.