marko1601 Posted January 25, 2022 Posted January 25, 2022 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.comWells 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
Solution Beyondspace Posted January 28, 2022 Solution Posted January 28, 2022 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.comWells 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 marko1601 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
marko1601 Posted February 2, 2022 Author Posted February 2, 2022 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 Beyondspace 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment