enorrisart Posted November 7, 2020 Share Posted November 7, 2020 Site URL: https://erikanorris.com/bitesized-series Hi, I have a gallery which opens images into a lightbox. It looks like the height of the screen determines the width of the image, so unfortunately, some of my images are displaying at almost the full width of my 27" iMac. The image size is 2500px as suggested, but I don't want them to display so large. Is there any way to set a max-width so that my images can be displayed at a more natural size? The website is: https://erikanorris.com/bitesized-series I have increased some of the padding around the images to make them a bit smaller, but for the really widescreen images it is not enough. I am also trying to figure this out for my product pages, but all the images in the product pages are the same aspect ratio, so it isn't as big of an issue. Thanks! Erika Link to comment
Solution Beyondspace Posted November 7, 2020 Solution Share Posted November 7, 2020 I made a breakpoint at 1440px, hope it fit your screen dimension, put it in Design->Custom Css @media only screen and (min-width: 1440px) { .sqs-lightbox-padder img { max-width: 800px !important; height: auto !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); } } Nick.Loubser, Goashape-Studio and JoanaTorres 3 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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
enorrisart Posted November 9, 2020 Author Share Posted November 9, 2020 @bangank36, thank you! This is exactly what I wanted. Beyondspace 1 Link to comment
creativesurfing Posted April 10, 2021 Share Posted April 10, 2021 On 11/7/2020 at 4:41 AM, bangank36 said: I made a breakpoint at 1440px, hope it fit your screen dimension, put it in Design->Custom Css @media only screen and (min-width: 1440px) { .sqs-lightbox-padder img { max-width: 800px !important; height: auto !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); } } Hello, I have a simple grid gallery I am trying to apply this to but I cannot make it work, any tips?? Link to comment
tuanphan Posted April 15, 2021 Share Posted April 15, 2021 On 4/11/2021 at 4:48 AM, creativesurfing said: Hello, I have a simple grid gallery I am trying to apply this to but I cannot make it work, any tips?? Can you share link to page wherre you use gallery grid? We can tweak code easier 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
Beyondspace Posted April 27, 2021 Share Posted April 27, 2021 3 hours ago, creativesurfing said: @tuanphan @bangank36 , not sure what is going on - it was working ok and now its not working again. The code I am using is exactly as above and its on a simple gallery grid that I'm having the size problems. /* reduce size of lightbox */ @media only screen and (min-width: 1440px) { .sqs-lightbox-padder img { max-width: 800px !important; height: auto !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }} Do you know some reason why this wouldn't be working? Projects page, first project and then scroll down to 'project development' grid, thank you What is your site url BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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
JoanaTorres Posted April 19, 2022 Share Posted April 19, 2022 hi @bangank36, I tried the css you suggested but it's not working... I'm quite inesperienced at this, could you please help? Appreciated!! My website is www.oficinadesign.org Thanks! Link to comment
Beyondspace Posted April 19, 2022 Share Posted April 19, 2022 Have you tried refresh the result on Incognito mode. Maybe the bug of preview does not make you get it BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment