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


here's 2 images

  1. width:300px, height:200px
  2. width:200px, height:600px

i want both of these displayed below

  1. width:100px, height:66.6px
  2. 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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -