text align center from top code example
Example 1: css align items vertical center
.parent {
display: flex;
justify-content: center;
align-items: center;
}
Example 2: text align left top
td[rowspan] {
vertical-align: top;
text-align: left;
}
Example 3: vertical align css
.container{
display: table;
}
.div-inside-container{
display: table-cell;
vertical-align: middle;
}
Example 4: text align left top
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<table style="width:50%;">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr style="height:100px">
<td valign="top">January</td>
<td valign="bottom">$100</td>
</tr>
</table>
<p><b>Note:</b> The valign attribute is not supported in HTML5. Use CSS instead.</p>
</body>
</html>