I want to align table.
My code
tr {
height: 70px;
display: flex;
align-items: center;
}
tr:hover {
border-bottom: 2px solid black;
}
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
<tr>
<td>Joe</td>
<td>Swanson</td>
</tr>
<tr>
<td>Cleveland</td>
<td>Brown</td>
</tr>
</table>
Just check my align-items: center;
When set it to align vertical alignment I got a problem.
On hover on row all row moves by 2 pixels (this border). Without align-items: center
, to work good but is not aligned.