Is there a way to make two separate tables interact with each other using CSS pseudo-selectors? I have a data table and an auto-numbered table, and I want the rows to highlight in both tables when hovering over a cell in one of them. I've tried using useState, but I'm looking for a pure CSS solution. If anyone has any insights or suggestions, please share them.
If achieving this with pure CSS is not possible, could we use event handlers with pseudo-selectors instead? Your thoughts on this would be appreciated as well.
You can view the code on Codepen.
.sticky-table tbody tr:hover td,
.auto-number-table tbody tr:hover td {
background-color: #e0e0e0;
}