I have a table with multiple heads inside th tags where I want to be able to change another element #box1 to be shown when hovering over the #heading element. This works when replacing the th tag with div or section tags. Why wont it work with th tags?
#heading {
text-decoration: none;
}
#box1 {
display: block;
background-color: red;
width: 100px;
height: 100px;
}
#heading:hover + #box1 {
display: block;
background-color: blue;
width: 50px;
height: 50px;
}
<table id="main-players-container">
<tr id="headings">
<th id="heading">Name</th>
<th>Price</th>
</tr>
</table>
<div id="box1">
<p>box to change css</p>
</div>