on-internet
← Community

Overflow: auto doesn't show top part of image

Stack Overflow ·

I have a lightbox on my site, with a checkbox you can click on to see the current image zoomed in. I put overflow: auto; on the lightbox image, but it's actually not showing the top part of the images, when you click on the checkbox. How can I make it display the whole image? Here is my code (somehow the lightbox images are skewed towards left here, they don't in my site though so ignore it) const gallery = document.querySelector(".gallery"); const lightbox = document.querySelector(".lightbox"); const lightboxImage = lightbox.querySelector("img"); const closeBtn = lightbox.querySelector(".clos

Comments

Sign in or sign up to comment and upvote.

No comments yet.