I have a text and image vertically aligned perfectly.
(Question/Issue) But I would like to put another line under it, like so...
I've tried putting a <br\>
in the span but the text then goes directly under the image.
Here's the code for the first vertical alignment.
<img src="/" class="circular" style="vertical-align:middle;">
<span class="text">Text</span>
You can use line-height
on text if you know image's height.
See this snippet:
.img {
float: left;
}
.txt {
float: left;
margin: 5px 0 5px 10px;
}
.txt-line {
line-height: 20px;
}
<div>
<img class="img" src="http://placehold.it/50x50" />
<div class="txt">
<div class="txt-line">Title</div>
<div class="txt-line">Description</div>
</div>
</div>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments