title: Setting an image button in CSS - image:active
body: <p>I'm trying to replace the submit button with an image by defining it in a <code>class="myButton"</code> and change the styles in CSS. the <code>myButton:active</code> doesn't seem to work when being clicked.</p>
  
  <p>Here is my CSS:</p>
  
  <pre class="lang-css prettyprint-override"><code>.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;
  }
  </code></pre>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;input class="myButton" type="submit" value=""&gt;
  </code></pre>