Overwrite CSS min-width on image in Safari/Chrome -
i overwriting min-width style 100% auto works fine in firefox not in safari , chrome. can't figure out why..?!
find samle code below or http://jsfiddle.net/zxsbodlp/:
div img { min-width: 100%; max-width: 100%; width: auto !important; height: auto !important; } div.small img { min-width: auto; max-width: auto; } <div> <img src="http://lorempixel.com/400/200/" width="400" height="200" alt="" /> </div> <div class="small"> <img src="http://lorempixel.com/400/200/" width="400" height="200" alt="" /> </div>
the following should work.
min-width: initial!important;
Comments
Post a Comment