0

I have a following condition:

<div>
    <h2>Without link</h2>
    <img src="some link"/>
</div>

<div>
    <h2><a href="#">With link</a></h2>
    <img src="some other link"/>
</div>

I have to apply style on every img tag if its sibling h2 has a link in it. Can it be done using css only?

Pragun
  • 1,123
  • 8
  • 20

0 Answers0