I am creating a responsive website and want the images to occupy no more than 2/3 of their columns, but not be less than 300 pixels wide (or larger than the original image width).
I use the following CSS:
img {max-width:66%;min-width:300px;}
In Chrome + Firefox, this works fine - starting with a very wide one, the image is displayed according to its loaded size; then when it will be 2/3 of the column, it starts to decrease until it reaches 300 pixels, and then it does not decrease.
In IE10, the image continues to shrink to 300 pixels - it completely ignores 300 pixels.
Is there a way for IE10 to understand that the minimum width should take precedence?
Fiddle: http://jsfiddle.net/WHDsm/3/
Please note that using something like width: 66% is not an option, since then there is no way to say "do not show more than loaded".
source share