Jump to content

Center Images in Gallery Section (v 7.1)

Go to solution Solved by tuanphan,

Recommended Posts

How can I center images in gallery section (v 7.1)?

In the "Upcoming" section of my website, posters get added and removed frequently. I have the row set to 4 across because it fits the page best, but at times (like now) when there are only 2 images in the gallery I want the images to stay the same size but be centered on the page. I tried custom CSS but was only finding code for gallery blocks and not gallery sections. I tried adding a dummy blank PNG as a poster but it messed up the grid in the mobile view. Please advise, thanks! 

 

gallery section with 2 images.png

Link to comment
  • 2 weeks later...
  • Solution
11 hours ago, CPPteam said:

https://www.creativepartnersproductions.com/ 

This issue specifically pertains to the "Upcoming" section. Thanks!

Try this code to Website Tools > Custom CSS

@media screen and (min-width:992px) {
section[data-section-id="66156e25de8f13445767a6b9"] figure:nth-child(n+1) {
    position: relative;
    left: calc(~"50% + 1vw");
}
}

 

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.