July 31, 201115 yr I am trying to create my own very simple image viewer using html/css. I can get everything to work other than 1 aspect.......i am using % widths, not pixels, as I do a lot of panoramas, and would like people with larger windows to be able to see them bigger.....i can get the image to do exactly this, however when i use a standard 3:2 image in the viewer, it results in being way to big for the viewer. I have tried setting a maximum height, which works, but ends up distorting the image as the 100% width still applies. So does anyone know a way to have the width at 100% UNTIL the height reaches 500px, at which point width becomes fixed at the appropriate proportions of the image?! I hope this make sense! Thanks
Create an account or sign in to comment