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
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

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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.