I'm trying to change the color of text to "white" when mouse is hovered on the background image or when its hovered on the div
. I know that I'd have to use Pseudo
class combination for this but just can't figure it out. Its got to be something very simple I know.
Here's the code.
.bigbox {
border-bottom: 6px solid #00a37a;
position:relative;
}
.bigbox:hover {
border-bottom: 6px solid #ee5630;
}
.h2title {
padding-left:70px;
margin-top:200px;
position:absolute;
z-index:11;
color:black;
text-decoration:none;
}
.img2 {
opacity:0.2;
margin-bottom:5px;
}
.img2:hover {
opacity:0.9;
margin-bottom:5px;
}
.img2 + h2title:hover {
color:white;
}
<div class="bigbox">
<a class="h2title" href="#"> <h2> Some Text</h2></a>
<center>
<img class ="img2" src="http://www.adweek.com/files/imagecache/node-blog/blogs/istock-unfinished-business-hed-2015.jpg" />
</center>
</div>