Copyright © tutorialspoint.com

CSS - vertical-align

previous next


Advertisements

Description:

The vertical-align property determines the alignment of text within a line, or within a table cell.

Possible Values:

Applies to:

inline-level elements and elements with a display of table-cell

DOM Syntax:

object.style.verticalAlign="baseline";

Example:

Here is the example:

<table style="height:200px; width:400px;border:1px solid red;">
<tr><td style="vertical-align:bottom;" >
<p>This will be aligned to bottom of the cell.</p>
</tr></td>
</table>

This will produce following result:

This will be aligned to bottom of the cell.

To Become more comfortable - Do Online Practice


previous next

Copyright © tutorialspoint.com