Stopping image background-color changes when using CSS a:hover

Just found a way of stopping the css background-color from changing when using a:hover to change this property on text links.

The CSS below will cause the background-color of text anchors to change when the mouse moves over, but also causes a strange effect behind images.

a:hover {
  background-color: #88f;
}

This is easily stopped by declaring img as a block element:

img {
  display: block;
}