Themans

How can i align my images with text?

Asked by Themans 2 years ago text align images


Heri Setiawan
1

Most Helpful

Most Helpful

 
@rollback999:
i wonder if there is still somebody out there using vertical-align as it has been deprecated since css2.0 CMIIW. If you want the text to be vertically aligned, it'd be better to use a line-height property, which the value equals to the parent element's height. E.g:
Put the p inside the div:
Div {
height: 200px;
}
p{
line-height: 200px;
}

by Heri Setiawan 2 years ago

Rollback999
0
 
You can position the image relatively by:

<div style="line-height:18px; font-size:12px;">
<img src="http://cdn.qhub.com/somepic.jpg" style="height:18px; vertical-align:middle; position: Relative; bottom: 2px;">ANY TEXT
</div>

by Rollback999 2 years ago

Answer this question

How can i align my images with text?

0 errors found:

 
0