Sorry, I didn't take into consideration botht he landscape and portrait layouts of images. Instead of adding the width, you should add max-width and max-height to the image:
max-height:500px;
max-width:580px;
It does appear you have added it to the correct place though.