references: http://stackoverflow.com/questions/3029422/image-auto-resize-to-fit-div-container
to the image tag. Instead, give it:
max-width:100%; max-height:100%;