I am trying to use CSS to scale my images to exact values:
HTML:
<div id="thumbnail-container">
<img src="sample-pic.jpg"/>
</div>
CSS
#thumbnail-container img {
max-height: 230px;
max-width: 200px;
}
This example sample-pic.jpgis actually 320x211.
In Firefox 11.0, this code works fine, and FF resizes sample-pic.jpgto the maximum restrictions of 230x211 specified in the CSS rule.
However, in IE 9 rules max-heightand max-widthare completely ignored, and the image is displayed as a normal size of 320x211.
How to change HTML / CSS so that both IE 9 and FF 11.0 honor these maximum limits? Thanks in advance!
source
share