Hello everyone, the question is, do not tell me how to reduce the size of the div so that the image that is in it also decreases and is not cropped. Thanks to all.
2 answers
Example
div { display: inline-block; border: 2px solid #00f; } img { max-width: 100%; display: block; } <div><img src="http://placehold.it/350x150"></div> |
Thanks to everyone, I have already decided, that’s the answer.
<div style="width:100px;height:100px;"> <img src="logo1.jpg" width="100%" height="100%"> </div> |