Typography

Vertical Align

Utilities for sets the vertical alignment of an inline or table-cell box.


Variant

Active Checked Child-Selection Dark Mode Disabled Expand First-Last-Selection First-Letter Focus Focus-Visible Focus-Within Fullscreen Group-Focus Group-Hover Hover Landscape Light Mode Portrait Reduce-Motion Responsive Selection-Hover Visited

API

classcss
align-topvertical-align: top
align-baselinevertical-align: baseline
align-middlevertical-align: middle
align-bottomvertical-align: bottom
align-text-topvertical-align: text-top
align-text-bottomvertical-align: text-bottom

Usage

Set element vertical alignment to top.

Text Text
Text Text Text
<div>
...
<img class="align-top ... inline-block" src="...">
...
</div>

<div>
...
<div class="align-top ... inline-block">
...
</div>
...
</div>
HTML
img {
@extend
.align-top,
.inline-block;
}
SCSS

Set element vertical alignment to bottom.

Text Text
Text Text Text
<div>
...
<img class="align-bottom ... inline-block" src="...">
...
</div>

<div>
...
<div class="align-bottom ... inline-block">
...
</div>
...
</div>
HTML
img {
@extend
.align-bottom,
.inline-block;
}
SCSS

Set element vertical alignment to baseline.

Text Text
Text Text Text
<div>
...
<img class="align-baseline ... inline-block" src="...">
...
</div>

<div>
...
<div class="align-baseline ... inline-block">
...
</div>
...
</div>
HTML
img {
@extend
.align-baseline,
.inline-block;
}
SCSS

Set element vertical alignment to middle.

Text Text
Text Text Text
<div>
...
<img class="align-middle ... inline-block" src="...">
...
</div>

<div>
...
<div class="align-middle ... inline-block">
...
</div>
...
</div>
HTML
img {
@extend
.align-middle,
.inline-block;
}
SCSS