Jump to content

Making a Slideshow Gallery Block spanning entire page responsively

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: https://www.aistebagdonaite.com

Dear forum,

I am looking for a way to make an automatic slideshow gallery block span the entire page while at the same time being responsive both to window width and height.

The gallery block in question is this one on the homepage: https://www.aistebagdonaite.com
Wells layout (7.0)

To explain this in an easy way, I want to make the automatic slideshow have the exact same layout and responsiveness as when you have clicked a thumbnail from the 'Vases' page and see a full size image: https://www.aistebagdonaite.com/vases/pc0az7jqbp093pe5xi4xkdsw17vf4r - the only difference being the automatical rotation. 

I have the page width set to 100%, and the slideshow's width is reacting to the window size. But the thing I'm missing is the height of the slideshow to react as well.

I have tried adding

max-height:100vh;

to the block id for images, but it's not working - only scaling the image height which gives it a weird "squashed" aspect.

I'm sure there is an easy way around, but I'm too much of a noob to find it.

I would be super grateful if someone out there could help me imitating the style of that built-in gallery view.

Best regards,
Mark

Link to comment
  • Solution
On 1/26/2022 at 4:18 AM, marko1601 said:

Site URL: https://www.aistebagdonaite.com

Dear forum,

I am looking for a way to make an automatic slideshow gallery block span the entire page while at the same time being responsive both to window width and height.

The gallery block in question is this one on the homepage: https://www.aistebagdonaite.com
Wells layout (7.0)

To explain this in an easy way, I want to make the automatic slideshow have the exact same layout and responsiveness as when you have clicked a thumbnail from the 'Vases' page and see a full size image: https://www.aistebagdonaite.com/vases/pc0az7jqbp093pe5xi4xkdsw17vf4r - the only difference being the automatical rotation. 

I have the page width set to 100%, and the slideshow's width is reacting to the window size. But the thing I'm missing is the height of the slideshow to react as well.

I have tried adding

max-height:100vh;

to the block id for images, but it's not working - only scaling the image height which gives it a weird "squashed" aspect.

I'm sure there is an easy way around, but I'm too much of a noob to find it.

I would be super grateful if someone out there could help me imitating the style of that built-in gallery view.

Best regards,
Mark

Try adding to Home > Design > Custom Css

#collection-61c46f73438d012e5c40747e  .sqs-gallery  {
  max-height: calc(100vh - 60px) !important;
}

 #collection-61c46f73438d012e5c40747e .slide img {
  height: 100% !important;
  width: auto !important;
   left: 50% !important;
   transform: translateX(-50%);
}
#collection-61c46f73438d012e5c40747e  .slide {
  height: 100% !important;
}

Let me know how it work on your site

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 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
On 1/28/2022 at 7:28 AM, bangank36 said:

Try adding to Home > Design > Custom Css

#collection-61c46f73438d012e5c40747e  .sqs-gallery  {
  max-height: calc(100vh - 60px) !important;
}

 #collection-61c46f73438d012e5c40747e .slide img {
  height: 100% !important;
  width: auto !important;
   left: 50% !important;
   transform: translateX(-50%);
}
#collection-61c46f73438d012e5c40747e  .slide {
  height: 100% !important;
}

Let me know how it work on your site

Dear Bangank36, thank you so much! It worked. I just changed the 'calc(100vh - 60px)' to 'calc(100vh - 7px)'. For some reason 60px made it reduce the height of the image to 50%.

Your code is super useful, so thank you!!

Best regards,
Mark

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.