To resize a image proportionally with CSS, simply set either width or height to auto. This should also work if the img html tag has width and height attributes set.

img.resize{
    width:200px;
    height: auto;
}

5 thought on “How to resize a image proportionally with CSS”

Leave a Reply