how to force an iamge to retain its aspect ratio in css code example
Example: keep aspect ratio of image css
img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}