Попробуйте реализовать Flex !
.header {
background: #fff;
padding: 16px;
display: flex;
}
.header img {
width: 36px;
height: 36px;
}
.header a.publisher-name {
margin-left: 6px;
color: rgba(0, 0, 0, 0.87);
font- weight: 500;
text-decoration: none;
vertical-align: middle;
font-family:
"Roboto", sans-serif;
}
a.publisher-name {
margin: 0;
}
.post-location {
font-size: 12px;
margin-top: 0;
}
<div class="header">
<img src="avatar.png" class="img-circle" />
<div>
<a href="user.html" class="publisher-name">Username</a>
<div class="post-location">
Location
</div>
</div>
</div>
Для этого просто оберните два элемента, которые вы хотите на RHS, в div
, чтобы при применении flex
он обрабатывал img
и div
как столбцы!
Подробнее о Flex здесь: Как сделать - двухколонный макет