html - Image not correctly pushing height of parent div -
this question has reply here:
image within div has space below image 7 answersi want parent div height of kid image, so:
<div class="container one"> <img src="http://placehold.it/250x250" /> </div>
the div should 250px tall. illustration, created jsfiddle here.
now happening in ff , chrome div bit taller, maybe 3 5 pixels.
i avoid having nesting unnecessary purely cosmetic markup like
<div class="container one"> <div class="inner"> <img src="http://placehold.it/250x250" /> </div> </div>
or similar.
i sense horribly obvious can't create sense of it.
<img>
inline element , adds space below due fact. prepare with
img { display: block }
html css
No comments:
Post a Comment