I have a strange problem in Firefox.
I have a div with a height defined in a constant px value, and inside it there is an img element. I have no problem with this installation in chrome, but in the parent div the firefox file is bigger than img.
This is the html structure:
<div class="wrapper"> <div class="imageHolder"> <img src='dasource'> </div> </div>
And this is css:
.wrapper { width: 900px; } .imageHolder { height: 400px; width: auto; background-color: green; float: left; max-width: 50%; overflow: hidden; } .imageHolder img { height: 100%; }
http://jsfiddle.net/MXudn/6
As explained in this script, in firefox the parent div is larger than the image in it.
Any ideas why this is so?
source share