chris chris - 8 months ago 67
CSS Question

Overwrite CSS min-width on image in Safari/Chrome

I am overwriting the min-width style from 100% to auto which works fine in Firefox but not in Safari and Chrome. I can't figure out why..?!

Find my samle code below or

div img {
min-width: 100%;
max-width: 100%;
width: auto !important;
height: auto !important;

div.small img {
min-width: auto;
max-width: auto;

<img src="" width="400" height="200" alt="" />
<div class="small">
<img src="" width="400" height="200" alt="" />


The following should work.

min-width: initial!important;