Reputation: 3494
Basically I have this markup:
<a>Link</a>
<a>
<img />
</a>
I would like to target the img on hover of the first Anchor-Tag. I have tried this
a:hover + a > img { ... }
but it didn't work. How could this be achieved?
Upvotes: 0
Views: 218
Reputation: 1774
You need to write like this. This is an example I gave to give you clear idea about how to write the code. Even your code formation was correct.
<a>Link</a>
<a>
<div>fgfgfg</div>
</a>
a div:hover{
background-color:blue;
}
div{
width:100px;
background-color:red;
}
Here is the demo http://jsfiddle.net/ZWhtQ/
Upvotes: 1