Aligning Text Vertically part 3
The vertical-align Property
Vertical align property does not act the same way for all elements.
For example, some additional CSS styling is needed for div elements.
The HTML:<div class="main">
<div class="paragraph">
This text is aligned to the middle
</div>
</div>
The CSS:
Result:
display: inline-table; and display: table-cell; styling rules are applied to make the vertical-align property work with divs.
Comments
Post a Comment