I have a strange padding between image and a span, I can not get rid of.
<div>
<img src="http://placehold.it/100x100" />
<span>hello</span>
</div>
img{
padding:20px;
background: red;
}
span{
width: 300px;
background-color: blue;
display: inline-block;
vertical-align: top;
height: 100%;
}
As you see in this fiddle, I have some space between red and blue elements. And no matter what I do, I can not get rid of it. Also I would be grateful is someone can tell me why my height: 100%;
does not work for the second element (it should be the same height as image).