I have some photos which have big sizes, I would like to set them to the Parent\'s dimension size. If one time the parent dimension is 1200x800, I would like to set the phot
In the case the image is bigger than the parent container you have to set :
img { max-width: 100%; }
If your image is smaller you have to set instead
img { min-width: 100%; }
otherwise it will just stay at its original width and height.(the Height is set to auto by default)