[css] Setting an image button in CSS - image:active

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="">

This question is related to css

The answer is


This is what worked for me.

<!DOCTYPE html> 
<form action="desired Link">
  <button>  <img src="desired image URL"/>
  </button>
</form>
<style> 

</style>