I have a DIV of 100px height & width and I am trying to fit an image of 800x800
pixels. Initially, the image seems very small, if I increase the min-height
and min-width
to 200px, then it seems fine but the image location moves and from the DIV also, the DIV size is no longer 100px, the image size becomes larger. I did search before posting my question here, unfortunately, I couldn't get what I want. Thus, I am p[osting a question.
JSfiddle:
I have two containers, orig
and stretch
, I want the image to be in the center of the stretch
DIV. However, the image moves from its position.
Note: It's not a duplicate question, because I want the image of stretch
container of with & height
of 200px and to be placed within the DIV container or in the center of stretch
container. I couldn't get a solution to solve this.