html - vertically align floated element -



html - vertically align floated element -

first of all, here images explaining i'm trying do:

how should be:

this how right now:

this markup:

<div class="info"> <img src="http://placehold.it/40x40" class="img-rounded avatar"> <h5 class="name">john doe</h5> <time>2 days ago</time> <a class="follow"><i class="fa fa-twitter"></i>follow me</a> <a class="like">112 likes</a> </div>

css:

.info { border:1px solid #e6e6e6; padding-top:20px; padding-bottom:20px; } img.avatar { float:left; padding-left:20px; padding-right:20px; } h5.name { margin:0; } span.date { font-size:12px; } a.like { float:right; padding-right:20px; }

here's jsbin illustration i'm trying do.

any suggestions on how can align them in screenshot?

instead of assigning various classes hyperlinks, nest them in block element.

i changed code, , updated jsbin, seeking?

http://jsbin.com/lajugiciyi/1/edit

.info { border: 1px solid #e6e6e6; padding: 20px 0 } .avatar { float: left; padding: 0 20px; } .name { display: inline-block } .name h5 { margin: 0; padding: 3px 0 0; } .like { float: right; padding: 0 20px; } .follow { display: inline-block; vertical-align: top; padding: 0 20px; }

html css

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -