I have a gallery on my site where users can upload images.
I would like the images to sit in a div that maintains its height, the images should be no larger than 500
The only way that I know of to possibly accomplish this is by setting either the width or height to auto.
width
height
auto
#gallery{ height: 500px; img{ max-height: 500px; width: auto; } }