CSS Vertical Align Text
vertical-align [It is assumed you know HTML before you read this CSS Vertical Align tutorial]
The vertical-align CSS property sets vertical alignment of an inline, inline-block or table-cell box. The vertical-align property in CSS controls how elements set next to each other on a line are lined up.
You can use CSS Vertical Align styles in any HTML on below elements objects.
vertical-align: baseline;
vertical-align: sub;
vertical-align: super;
vertical-align: text-top;
vertical-align: text-bottom;
vertical-align: middle;
vertical-align: top;
vertical-align: bottom;
<p>
top: <img style=”vertical-align: top” src=”star.png”/>
middle: <img style=”vertical-align: middle” src=”star.png”/>
bottom: <img style=”vertical-align: bottom” src=”star.png”/>
super: <img style=”vertical-align: super” src=”star.png”/>
sub: <img style=”vertical-align: sub” src=”star.png”/>
</p>
<p>
text-top: <img style=”vertical-align: text-top” src=”star.png”/>
text-bottom: <img style=”vertical-align: text-bottom” src=”star.png”/>
0.2em: <img style=”vertical-align: 0.2em” src=”star.png”/>
-1em: <img style=”vertical-align: -1em” src=”star.png”/>
20%: <img style=”vertical-align: 20%” src=”star.png”/>
-100%: <img style=”vertical-align: -100%” src=”star.png”/>
</p>
top:
text-top:
img.a {
vertical-align: baseline;
}
img.b {
vertical-align: text-top;
}
img.c {
vertical-align: text-bottom;
}
img.d {
vertical-align: sub;
}
img.e {
vertical-align: super;
}
<table>
<tr>
<td style=”vertical-align: baseline”>baseline</td>
<td style=”vertical-align: top”>top</td>
<td style=”vertical-align: middle”>middle</td>
<td style=”vertical-align: bottom”>bottom</td>
<td>
<p>Why Zoom App Download For PC Free? Zoom is the literal definition of year 2020 and still ongoing while I write — not joking. Be it family talk, lessons and courses, work conferences, weddings or household occasions — every thing was virtual in 2020, 2121 and still ongoing while we are writing this article.</p>
<p>Utilizing the Zoom app additionally guarantees a great deal of neat options otherwise unavailable with Chrome extension.</p>
</td>
</tr>
</table>
table {
margin-left: auto;
margin-right: auto;
width: 80%;
}
table, th, td {
border: 1px solid black;
}
td {
padding: 0.5em;
font-family: monospace;
}
| baseline | top | middle | bottom | Why Zoom App Download For PC Free? Zoom is the literal definition of year 2020 and still ongoing while I write — not joking. Be it family talk, lessons and courses, work conferences, weddings or household occasions — every thing was virtual in 2020, 2121 and still ongoing while we are writing this article. Utilizing the Zoom app additionally guarantees a great deal of neat options otherwise unavailable with Chrome extension. |
Below are the browser versions that fully supports the property.
| Property | Chrome | Edge | Firefox | Safari | Opera |
|---|---|---|---|---|---|
| vertical-align | 1.0 | 4.0 | 1.0 | 1.0 | 4.0 |
Reaching one million dollars in investable assets represents a fundamental shift in your financial life.…
Starting Data center business is not easy task. Energy, power, location, consultations, tax, real estate,…
Oil Facilities or Oil Refineries Hit Inside Iran Israel has launched airstrikes on several major energy…
Oracle Corporation (ORCL) (Oracle Earning) will release its fiscal third-quarter earnings late Tuesday, following a…
Every year, capable pharmacy interns walk into the oral exam confident in their preparation. Many…
Palantir Technologies Inc. (NASDAQ: PLTR) today reported financial results for the fourth quarter and full…