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 |
The Honda Talon is a high-performance UTV designed for adventure, speed, and navigating tough terrains.…
For those who spend a lot of time traveling, camping, or engaging in outdoor activities,…
Every business is striving to capture the attention of its target audience and achieve a…
Microsoft Access database is a data management system that is used to manage and analyze…
Electricity is both a necessity and a luxury, and having a reliable inverter is a…
Streamlining operations is crucial for businesses seeking efficiency and competitiveness in today's fast-paced market. Organizations…