Is there a way to resize (scale down) images proportionally using ONLY CSS?

I’m doing the JavaScript way, but just trying to see if this is possible with CSS.

18 s
18

To resize the image proportionally using CSS:

img.resize {
    width:540px; /* you can use % */
    height: auto;
}

Leave a Reply

Your email address will not be published. Required fields are marked *