title: CSS hover image position change
body: <p>I'm certain it's something super stupid, but I've been stuck for a while, now... So, I have images on a website, and I'd like them to move slightly on hover.</p>
  
  <p>So I have in the HTML:</p>
  
  <pre><code>&lt;a href="someaddress"&gt;&lt;img class="thumb" src="somefile"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>And in the CSS:</p>
  
  <pre><code>img.thumb {
      position:relative;
      top:0px;
      background:#333399;
  
  }
  
  img.thumb:hover {
      position:relative;
      top:5px;    
      background:#00CCCC;
  
  }
  </code></pre>
  
  <p>The backgrounds are there just to see whether something is happening. Actually, the background doesn't change, so the hover is never taken into account. Does anyone have an idea why that could be??</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks a lot, everyone!</p>
  
  <p>I actually solved it by throwing in a:</p>
  
  <pre><code>a &gt; img.thumb:hover {
  position:relative;
  top:2px;
  }
  </code></pre>
  
  <p>Which worked. Still not exactly sure why it didn't work just with img.thumb:hover...</p>