How to change the color of <button> tag on mouse over in HTML and CSS

1 Answer

0 votes
<!-- index.php -->

echo '<div id="div-id"><a href="#"><button id="button-id">Click Here</button></a></div>';

 

/* style.css */

#button-id {
    background: green;
}
#div-id:hover #button-id {
   background: red;
}


answered Apr 29, 2015 by avibootz
edited Apr 29, 2015 by avibootz

Related questions

3 answers 418 views
3 answers 408 views
1 answer 275 views
1 answer 293 views
1 answer 291 views
1 answer 273 views
1 answer 251 views
...