HTML CSS examples for CSS Widget:Image
A:hover to change image border via background color
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .pop-posts-left { background:red; float:left; padding:11px 16px 11px 16px; overflow:hidden; } .pop-posts-right { float:right; padding:11px 16px 11px 16px; background:orange; } .pop-posts-left:hover { background:green; } .pop-posts-image-left a:hover { background:green; } .pop-posts-right:hover { background:green; } .pop-posts-image-right a:hover { background:green; } </style> <!-- w ww.jav a 2 s. c o m--> </head> <body> <div class="popular-posts"> <div class="pop-posts-left" width="160px" height="160px"> <div class="pop-posts-image-left"> <a href="http://www.livecrafteat.com/live/meal-planning-template/"> <img src="https://www.java2s.com/style/demo/Opera.png"> </a> </div> </div> <div class="pop-posts-right" width="160px" height="160px"> <div class="pop-posts-image-right"> <a href="http://www.livecrafteat.com/live/meal-planning-template/"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> </a> </div> </div> </div> </body> </html>