zurb / twentytwenty

jQuery Plugin to Compare Images
ISC License
1.27k stars 295 forks source link

How best to ensure entire image is always visible? #88

Closed lokoyan closed 6 years ago

lokoyan commented 6 years ago

Hello, first, thank you for developing such a great tool. I'm not a programmer, and this was so easy to implement.

I'm hoping to set it up so that my entire image is visible on the screen (horizontally AND vertically). Using the "large-12" class in the outer

it uses (almost) all the width, but the image is too tall, so extends off the bottom of the screen. Any suggestions on the best way to have it fit so the entire image is showing?

Thanks!

raphaeleidus commented 6 years ago

with CSS you can set the image to have a max-height: 100vh and max-width: 100vw this will work for all modern browsers for some older it wont constrain it but it wont break it either.