0
<div class="related_images">
    <img class="related_attachment" src="img url"/>
</div>
<a class="related_title">Stackoverflow</a>

I'd like to know if it's possible to add effects to the .related_attachment when I hover over the .related_title since they aren't child elements.

I've tried the following with no luck..

.related_title:hover ~ .related_attachment { opacity: 1; }
.related_title:hover + .related_attachment { opacity: 1; }
iBrazilian2
  • 2,066
  • 5
  • 21
  • 43
  • Pretty sure this is a duplicate of another question, but no, there's no way to do this currently with CSS. – TylerH Oct 12 '15 at 17:38
  • No, this is not possible with CSS. You can not target the child of a parent's sibling. – APAD1 Oct 12 '15 at 17:38
  • I'm not sure if this can be done with pure CSS. You may need to mix in JavaScript to accomplish this. – Ally Ripp Oct 12 '15 at 17:39

0 Answers0