Need help centering a span vertically within a div when using float:right?
<div class="card">
<div class="card-header">
<h5>TEST</h5>
<span class="fa fa-info"></span>
</div>
<div class="card-body">
<div class="card-text">
TEXT<br />
TEXT<br />
TEXT<br />
TEXT<br />
</div>
</div>
</div>
.card {
width: 200px;
}
.card-header h5 {
display: inline;
}
.card-header span {
float: right;
}
In the current setup, the fa icon in span is aligned to the top. How can I make it vertically centered?
Check out the jsfiddle for more details: http://jsfiddle.net/zj3cubtd/