Home > DeveloperSection > Forums > How do you resize an image while maintaining the aspect ratio?
Hugh Jackman
Hugh Jackman

Total Post:52

Points:366
Posted on    June-15-2013 12:41 AM

 HTML5 HTML5 
Ratings:


 1 Reply(s)
 1057  View(s)
Rate this:
Hi,

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

Thanks in advance. 


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-15-2013 4:30 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick