Rotate vertically vertically
How do I align these two icons with float: right
?
Html
<li>
<img src="https://graph.facebook.com/102031900129645/picture?type=square" />
<a href=""> Johnny Smith </a>
<span class="">
<i class="fa fa-check"></i>
<i class="fa fa-close"></i>
</span>
</li>
CSS
li {
width: 200px;
list-style-type: none;
}
img {
vertical-align: middle;
}
span {
float: right;
vertical-align: middle; // not working
}
+3
source to share
3 answers
Floating elements do not obey vertical-align
. Instead, you need display: inline-block;
: http://plnkr.co/edit/zTdoW4TBUbREzI4ADTQO?p=preview
0
source to share