css - 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 displayed below
- width:100px, height:66.6px
- width:33.3px, height:100px
these adjusted 100px mamimum keeping ratio. how can write in css?
applying class .resize
below images should want...
.resize { max-width: 100px; max-height: 100px; }
example: http://jsfiddle.net/ru5qk/
Comments
Post a Comment