I am trying to replace the submit button with an image by defining it in class="myButton" and changing the styles in CSS. myButton:active does not seem to work when clicked.
Here is my CSS:
.myButton{ background:url(./images/but.png) no-repeat; cursor:pointer; border:none; width:100px; height:100px; } myButton:active { background:url(./images/but2.png) no-repeat; }
HTML code:
<input class="myButton" type="submit" value="">
source share