centrer image
by matmat
HTML
<div class="frame">
<span class="helper"></span><img src="http://jsfiddle.net/img/logo.png" height="20" /><a href="">test</a>
</div>
CSS
.frame {
height: 25px; /* equals max image height */
width: 250px;
border: 1px solid red;
text-align: left; margin: 1em 0;
padding-left:2px;
}
.frame a{
margin-left:2px;
}
.helper {
display: inline-block;
height: 100%;
vertical-align: middle;
}
.frame img {
background: #3A6F9A;
vertical-align: middle;
height: 20px;
width:20px;
}