Adjusting Image Aspect Ratios in CSS


Control the aspect ratio of images without distorting them.

Source Code

img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments