Reputation: 1300
I have an image in a div in a div in a div. I would like to resize the image to fit in the div , keeping aspect ratio. it works in firefox, but i can't get it to work in webkit based browsers.
It works in Firefox if the width is set to width: -moz-available;
Is there anything similar in Chrome?
Upvotes: 0
Views: 378
Reputation: 17753
Set the image to max-width: 100%
. If you need high quality scaling in IE7 or lower, also add an AlphaImageLoader
filter with sizingMethod='scale'
.
Upvotes: 2