chris chris - 1 year ago 173
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="" />

Answer Source

The following should work.

min-width: initial!important;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download