HTML CSS examples for CSS Widget:Color
Change border color of both divs when hover on one div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .upperdiv, .lowerdiv{<!-- w ww . ja v a 2 s. co m--> width: 100px; height: 100px; border: 1px solid blue; } .upperdiv:hover, .upperdiv:hover+.lowerdiv{ border-color: red; } </style> </head> <body> <div class="upperdiv"> Some text </div> <div class="lowerdiv"> </div> </body> </html>