This seems like it should be straight forward, and I've searched high and low for an answer.
Things to note:
- I'm attempting to make a menu system. Eventually I'd like to hover a TH to show the TDs below.
- I can't use Class/ID/Name due to limitations (markdown)
- I can only use HTML, CSS, and LESS
- I can't use Javascript or jQuery
I've tried this in a variety of ways, but the code below is a basic example of what I'm attempting to accomplish.
table th:nth-child(1):hover {
color: red;
> td:nth-child(1) { color: red; }
}
table th:nth-child(2):hover {
color: red;
+ td:nth-child(2) { color: red; }
}
table th:nth-child(3):hover {
color: red;
td:nth-child(3) { color: red; }
}
<table>
<thead><tr><th>Menu 1</th><th>Menu 2</th><th>Menu 3</th></tr></thead>
<tbody>
<tr>
<td>menu 1 item</td>
<td>menu 2 item</td>
<td>menu 3 item</td>
</tr>
</tbody>
</table>
When hovering over a a TH, I'd like something to apply to the TD.
Any assistance would be greatly appreciated!