Table Row Hover with Display: Flex
Table row hover effects without
HTML
<table>
<tr>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
</tr>
</table>
CSS
table {
border-collapse: collapse;
border-spacing: 0;
table-layout: fixed;
}
tr {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
position: relative;
align-items: center;
/* Vertically aligns td's inside the tr */
}
tr:hover {
z-index: 1/* or higher if necessary */
-webkit-box-shadow: 0px 2px 4px #e06547;
-moz-box-shadow: 0px 2px 4px #e06547;
box-shadow: 0px 2px 4px #e06547;
background-color: #d4d5d6;
}
td {
width: 10em;
text-align: center;
}