Reputation: 199
I have a div that has a link in it, right now if I hover over the link it chnages color, but I want to hover over the div aswell to chnage the color, here is the code:
<div class="first_product margin_right left">
<a href="/link">
</a><div class="first_product_text"><a href="/link"></a><a href="link">Automation <span>+</span></a></div>
</div>
Upvotes: 0
Views: 3078
Reputation: 1
This should solve your problem.
CSS:
.first_product_text div:hover a {color:#HOVERCOLOUR;}
Upvotes: 0
Reputation: 386
I'm all for using Jquery, but if you want to avoid it
HTML:
<div class="first_product margin_right left">
<div class="first_product_text">
<a href="/link"></a>
<a href="link">Automation <span>+</span></a>
</div>
</div>
CSS:
.first_product_text:hover{background-color:#f22;}
heres the JsFiddle
Upvotes: 1