How to align img and h4 vertically?
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>
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.
use this
<div>
<img class="paragraph-icon" src="images/desc.png" style="vertical-align: middle;">
<h4 style="display: inline;">Description</h4>
</div>
精彩评论