Jump to content

How do I adjust gallery section height?

Recommended Posts

Site URL: https://www.marekslavicky.com/en/home/#shop

Hi all!
I want to decrease the height of the gallery section, so the images inside become smaller.
I use the Gallery section Simple grid, with 3 images only (on vertical 2:3 format, which I must keep). However, they are too big to fit a desktop screen. I increased the spacing to 150, which helps a bit, but then they are too far away from each other. 
Any help (including CSS or code injection) would be appreciated!
Thanks,
Marek

Link to comment
  • Replies 2
  • Created
  • Last Reply
6 hours ago, MarekS said:

Site URL: https://www.marekslavicky.com/en/home/#shop

Hi all!
I want to decrease the height of the gallery section, so the images inside become smaller.
I use the Gallery section Simple grid, with 3 images only (on vertical 2:3 format, which I must keep). However, they are too big to fit a desktop screen. I increased the spacing to 150, which helps a bit, but then they are too far away from each other. 
Any help (including CSS or code injection) would be appreciated!
Thanks,
Marek

I tried to use margin to make it smaller on various screen breakpoint

@media only screen and (min-width: 600px) {
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-wrapper {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media only screen and (min-width: 992px) {
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-wrapper {
    grid-column-gap: .5vw !important;
  }
}
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item {
    margin-right: 20px;
    margin-left: 20px;
  }
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item:first-child {
    margin-left: 40px;
    margin-right: 0
  }
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item:last-child {
    margin-right: 40px;
    margin-left: 0
  }
}
@media only screen and (min-width: 992px) {
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-wrapper {
    grid-column-gap: .5vw !important;
  }

  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item {
    margin-right: 20px;
    margin-left: 20px;
  }
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item:first-child {
    margin-left: 40px;
    margin-right: 0
  }
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item:last-child {
    margin-right: 40px;
    margin-left: 0
  }
}
@media only screen and (min-width: 1200px) {
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-wrapper {
    grid-column-gap: 1.5vw !important;
  }

  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item {
    margin-right: 40px;
    margin-left: 40px;
  }
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item:first-child {
    margin-left: 80px;
    margin-right: 0
  }
  section[data-section-id="5f9805d28a87cc2645835d86"] .gallery-grid-item:last-child {
    margin-right: 80px;
    margin-left: 0
  }
}

image.thumb.png.caa88be52827e51e067b14991530f75f.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

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.