Wednesday, 7 August 2013

How can I adjust image width and height to 100 x 100 keeping ratio?

How can I adjust image width and height to 100 x 100 keeping ratio?

Here's 2 images
width:300px, height:200px
width:200px, height:600px
I want both of these to be displayed as below
width:100px, height:66.6px
width:33.3px, height:100px
These are adjusted to the 100px mamimum keeping ratio. How can I write in
CSS?

No comments:

Post a Comment