title: CSS. Changing image visited link
body: <p>I have a image-hyperlink. And I want to change the image when the link have status visited. Could you show me how to do it? Preferably without using JavaScript.</p>
  
  <p>I'm trying to do the following: I joined both my images in single common image and here is my code:</p>
  
  <pre><code>&lt;a href="#" class="mylink"&gt;
     &lt;img src="common_image.jpg" width="240px" height="240px"/&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>And my styles:</p>
  
  <pre><code>    .mylink {
          width: 120px;
          height: 240px;
          display: block;
          overflow: hidden;
      }
  
      .mylink:visited img {
          margin-left: -120px;
      }
  </code></pre>