I have a <div>
containing child <img>
element:
<div class="wrapperdiv">
<img src="blob" class="myimg">
</div>
Now, I want the <div>
to have the same height as <img>
.
More elaborately, my goal is to have div with img inside to have exactly the same position as if there was only img without wrapper div!
I've tried setting height: auto
to the <div>
, but while it sets the height to roughly same as <img>
, it is larger by 1 pixel, and I'd like them to absolutely equal.