My page has space for an image that can be, say, a maximum 100x100 image. Users can upload any image dimension and the web application will resize it, maintaining aspect rat
You could try this:
.image_container { display:table-cell; overflow:hidden; text-align:center; vertical-align:middle; } .image_container img { vertical-align:baseline; }
Not 100% sure on browser compatibility, but should get you started in the right direction. Example: http://jsfiddle.net/fJtwX/1/