html - Is it possible to render an image in two sizes with correct proportion -


i have website on products have 1 pic associated them. dimension of pictures +200 x 200+. @ 1 place, want show image in 100x100 , @ other in 75x75.

is possible show images in same proportion or not. right now, images fatty or long or thin @ places.

if set only height or width of image, other dimension gets resized proportionally.

so, if image container let's 100x100 px, can style image this:

div.imagecontainer100x100px img {     max-width: 100px;     max-height: 100px; } 

or 75x75 px:

div.imagecontainer75x75px img {     max-width: 75px;     max-height: 75px; } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -