# Background on a:hover extends beyond borders

**URL:** <https://forum.kirupa.com/t/background-on-a-hover-extends-beyond-borders/200457>\
**Category:** Uncategorized\
**Created:** [September 12, 2006, 1:53pm UTC](https://forum.kirupa.com/t/background-on-a-hover-extends-beyond-borders/200457 "2006-09-12T13:53:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![belledumonde](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@belledumonde](https://forum.kirupa.com/u/belledumonde)\
**Post date:** [September 12, 2006, 1:53pm UTC](https://forum.kirupa.com/t/background-on-a-hover-extends-beyond-borders/200457/1 "2006-09-12T13:53:58Z")

</div>

i was going to put a link to the site, but im shy 😊 hehe…

so i’ll just describe the problem, i have a photoblog and the markup is like this:

```auto

<ul>
   <li><a class="image" href="image.jpg"><img src="thumb.jpg" /></a></li>
   <li><a class="image" href="image.jpg"><img src="thumb.jpg" /></a></li>
   <li><a class="image" href="image.jpg"><img src="thumb.jpg" /></a></li>
</ul>

```

and the style is like this:

```auto

a {
  background-color: inherit; 
  text-decoration: none; 
  }
a:link { 
  color: #3B3B3B; 
  border-bottom: 1px dashed; 
  }
a:visited { 
  color: #999; 
  border-bottom: 1px dashed; 
  }
a.image { border: none !important; }
a.image:hover { border: none !important; }
a:hover { 
  color: #3B3B3B; 
  background-color: #E6E6E6; 
  border-bottom: 1px solid !important;
  }
a.image:hover { background-color: #E6E6E6; }
img { 
  padding: 5px; 
  background-color: inherit; 
  margin-bottom: 10px;
  border: 1px solid #3B3B3B;
  }

```

so here’s how it works:

IE - this is what i was after: when you hover over the image, the background of the image changes color **within the border**

FF - now what i want: when you hover over the image, the background of the image and the 10px margin outside the bottom border changes color.

hoping someone could help me out with this little problem and if i have to have to have to post a link, I will… thanks! 🙂
