I'm having trouble figuring out how to highlight every two rows in a table as one when hovering over the current row. For example, if I hover on row 2, rows 2 and 3 should be highlighted. Then when I move to row 4, rows 4 and 5 should be highlighted, and so on.
Currently, when I hover over a row, only that specific row gets highlighted. Is there a way to achieve this using CSS? Or am I missing something obvious in my code?
table tr:nth-child(4n+4) {
background-color: #EBEBEB;
}
#table tr:nth-child(4n+5) {
background-color: #EBEBEB;
}
#table tr:hover {
background: #3498DB;
}
You can view the code I've been working on here: http://jsfiddle.net/g5o7v6qe/21/
I apologize if my question is unclear or difficult to understand. I have some knowledge of HTML and CSS, but this particular issue has me a bit stuck. Thank you for any help you can provide.