how to create proportional image height/width

PizzaPie picture PizzaPie · Aug 1, 2010 · Viewed 75.2k times · Source

So, I want to have an image resized to 30% of its original height/width. Pretend you don't know its height or width, how would you go about it using only CSS/HTML?

Answer

Blum picture Blum · Feb 10, 2012

If you need a quick inline solution:

<img style="max-width: 100px; height: auto; " src="image.jpg" />