HOW DO YOU RESIZE AN IMAGE WHILE MAINTAINING THE ASPECT RATIO?

Hugh Jackman

Total Post:52

Points:366
Posted by  Hugh Jackman
HTML5 
 1412  View(s)
Ratings:
Rate this:
Hi,

How do you resize an image while maintaining the aspect ratio?

Thanks in advance. 
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: How do you resize an image while maintaining the aspect ratio?

    Hi Hugh, 


    Set either the width or height to auto and explicitly set the opposite dimension with a fixed length. If width is auto, height has an explicit length , or if height is auto, with has an explicit length.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!