I’m trying to replace the submit button with an image by defining it in a class="myButton" and change the styles in CSS. the myButton:active doesn’t seem to work when being 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="">
Check this link . You were missing
.beforemyButton. It was a small error. 🙂