I am trying to align an image with a div that contains two rows of text like this:
Here is my current
<div class="first-div">
<img class="img" src="/image-icon.png" />
<div class="second-div">
<p class="m-0">hello world</p>
<p class="m-0">hello world</p>
</div>
</div>
my current css:
.second-div {
display: inline-block;
margin-left: 15px;
height: 50px;
vertical-align: center;
}
.first-div{
display: inline-block;
}
.img {
vertical-align: middle;
display: inline-block;
margin-top: auto;
margin-top: bottom;
height: 50px;
width: 50px;
}
.m-0 {
margin: 0;
text-align: center;
}
But i cant seem to align them without having to add a bottom margin to the picture which i assume is the wrong way of going about this.
i created a js fiddle so you guys can take a look https://jsfiddle.net/sav1bpk0/25/