I am facing an issue with my table styling where I want to apply a box-shadow effect when hovering over a row. However, despite setting the z-index accordingly, the background color of the td elements ends up covering the box-shadow, resulting in the hover effect not being visible.
Is there a way to resolve this conflict and have both background-color for the td elements and a box-shadow effect on row hover?
You can see the problem in action in this simple jsfiddle: https://jsfiddle.net/pjz43a52/
When you hover over a row, you'll notice that the box-shadow appears behind the other rows due to the z-index. If you remove the line for the td background-color, everything works as expected:
table td {
/* background-color: #EFEFEF; */
z-index: 1;
}
Any insights on why this behavior occurs would be appreciated!