Reputation: 29519
Is it possible to align this using CSS, so the text will be vertically centered next to image?
<div><img class="paragraph-icon" src="images/desc.png" /><h4>Description</h4></div>
Upvotes: 0
Views: 8543
Reputation: 367
try this:
<div style="height=IMAGE_HEIGHT; line-height:IMAGE_HEIGHT">
<img class="paragraph-icon" src="images/desc.png" />
<h4 style="display: inline;">Description</h4>
</div>`
replace IMAGE_HEIGHT with your image's height (and don't forget to add 'px;'), and that should make everything in that div centered vertically.
Upvotes: 4
Reputation: 8421
use this
<div>
<img class="paragraph-icon" src="images/desc.png" style="vertical-align: middle;">
<h4 style="display: inline;">Description</h4>
</div>
Upvotes: 0