Is it possible to make it so that when you click on a child of one parent block, the styles of the other parent block change, only with the help of css. For example: <div class="one"> <button>Кнопка</button> </div> <div class="two"></div> So that when you click on the button, the .two styles change

1 answer 1

  div.one:active + div.two{ color: red; } 
 <div class='one'> <button>Change</button> </div> <div class='two'>Test</div> 

  • A click is triggered not only by clicking on a button, but also by the whole .one div. - Heidel