diegor87 Posted January 11 Share Posted January 11 hello. i add this code for resizing the lightbox photos, and the problem is that the Longitudinal images got zoomed in and didn't got smaller, there is a way to fix it? https://www.diegorosman.com/projects/music-center this is the code: /* Resize lightbox images on mobile */ @media screen and (min-width:768px) { .gallery-lightbox-item img { width: 50% !important; height: auto !important; position: absolute !important; left: 50%; top: 50%; transform: translate(-50%,-50%); } } Link to comment
sorca_marian Posted January 11 Share Posted January 11 I would remove that custom code. It looks good without it. You want to decrease the size of only the wider images? 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
diegor87 Posted January 16 Author Share Posted January 16 On 1/11/2024 at 10:44 PM, sorca_marian said: I would remove that custom code. It looks good without it. You want to decrease the size of only the wider images? yes please @sorca_marian Link to comment
Solution sorca_marian Posted January 16 Solution Share Posted January 16 (edited) Add the below code in the Page Header Code Injection </style> .gallery-lightbox-item-src { max-width: 70vw; } </style> 70vw represents 70% of the screen width. The code allows a maximum 70% screen width on the images of the lightbox Edited January 16 by sorca_marian 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn 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