Here is the HTML code I am working with:
<div>
<img src="http://placehold.it/319x300" alt="">
<div>
And the corresponding CSS:
*{margin: 0; padding: 0;}
div{
background: red;
width: 319px;
height: auto;
}
img{
width: 100%;
height: auto;
}
Despite my efforts, the background color of the div element displays only at the bottom instead of the full height of the image. Is there a way to adjust the container to match the height of the image? I have checked for conflicting padding or margin within the code and Erics Reset styles have been applied to the site I am working on. You can find the sample code here: http://jsfiddle.net/ESmZW/1/ Thanks