I am inserting images into DIVS from a database. The images which are tall are over shooting the height of the DIV. I have fixed the width of the image so they dont overshoot the DIV width ways.

However I am struggling to fit the images in height whys. Can anyone advise how to do this please. Is it possible to fix both height and width so whatever the dimensions of image it will not overshoot the DIV.