I am currently working on a styled subscribe button and have encountered an issue. I want the background color of the entire box to change, along with the text color, when hovering anywhere on the box. However, my current code only changes the text color when hovering directly on it. Can anyone help me identify where I might be going wrong?
Here is the HTML:
<h3 class="subscribeHeader">
<a href="http://link.com/" target="_blank">Subscribe</a>
</h3>
And here is the CSS:
h3.subscribeHeader {
padding-top: 0.7em;
padding-bottom: 0.7em;
width: 35%;
margin: 0 auto;
border: 1px solid #373737;
}
h3.subscribeHeader a:hover {
color: #fafaf9;
}
h3.subscribeHeader:hover {
background-color: #373737;
}