I have the following:
h3 {
color: lightseagreen;
}
p {
color: rgb(0, 0, 0)
}
.section:hover {
color: rgb(237, 50, 237)
}
<div class="section">
<h3>Title</h3>
<p>Lorem Ipsum</p>
</div>
There's more styling to the hover, but for simplicity I've only included the color property.
Essentially, I want the default color to be the light sea green, but on hover over the section div i want it to be pink. The p element I want to keep black at all times.
I understand that the h3 ruleset is more specific than the .section:hover ruleset and thus the h3 won't change on hover. I made another ruleset to apply to h3:hover but that would only change color when I hovered over the h3 block.
How can I get the pink color to apply to the h3 when its parent is hovered?