I'm facing a challenge with a div that I want to react to hover, but it's connected to both a class and an id.
#levelbox1 {
left: 150px;
position: absolute;
background-color: rgb(0, 228, 0);
border-radius: 15px;
box-shadow: 1px 1px 4px, inset 0 0 10px rgb(255, 255, 255);
width: 250px;
height: 390px;
z-index: -5;
}
.levelbox {
position: relative;
z-index: 20;
}
.levelbox:hover, .levelbox:active {
box-shadow: inset 0 0 5px rgb(255, 255, 255);
width: 105%;
height: 105%;
}
<div id="thirdbody">
<div class="levelbox" id="levelbox1">
<center>
<h1 class="levelboxheader">
Beginner
</h1>
<p class="levelboxtext">
Features: <br>
- Aiming <br>
- Cps <br>
- W-tapping <br>
- Blockhitting <br>
- Basic explanations
</p>
</center>
</div>
Removing the id in the css resolves the issue, but finding a solution that accommodates both has been challenging. I've attempted changing the :hover state to match the id of the div, but it hasn't made much difference.