I am looking to create a hover effect for columns 1 through 7 of a row where, when the user hovers over any column within that range, certain styles are applied to all columns in the row except for columns 1 and 7. This means that the background color should change on the current row's columns 2 through 6, while excluding columns 1 and 7:
tbody tr:hover > td:not(:first-child):not(:last-child) {
cursor: pointer; background-color: rgb(221, 221, 221);
}
In addition, I want to have a similar hover style on columns 1 and 7 as well. To clarify, the desired behavior is as follows:
- When the user hovers over row x, column 1, only that single cell should get the hover effect.
- Similar to the above point, when the user hovers over row x, column 7, only that single cell should get the hover effect.
- If the user hovers over row x, any column from 2-6, then all cells in row x with columns 2 through 6 should receive the hover effect.