so I have a simple problem. I have a hover background image change effect, however there seems to be some extra padding on hover that I can’t get rid off.
My jsfiddle: http://jsfiddle.net/leongaban/G9dFa/
I’ve tried adjusting the padding of the background image on my hover, however adding the needed 20 pixels also adds extra spacing. Going to 0 does not allow the background image fill the space 🙁

Any tips appreciated! 🙂
HTML:
<div class="nav">
<div id="nav">
<ul>
<li><a href="#">HOME</a></li>
<li><a href="#">ABOUT US</a></li>
<li><a href="#">LINK 3</a></li>
<li><a href="#">LINK 4</a></li>
<li><a href="#">OUR BLOG</a></li>
</ul>
</div>
<div id="search">
</div>
</div>
CSS:
.nav {
width: 994px;
height: 27px;
background-image:url('http://leongaban.com/_stack/background_padding/assets/images/bg_nav.gif');
}
#nav ul li {
height: 27px;
margin: 0;
padding: 8px 20px 6px 20px;
line-height:30px;
text-align: center;
font-size: 11px;
border-right: 1px solid #fff;
display: inline;
}
#nav ul li a {
padding: 8px 0px 6px 0px;
color: white;
text-decoration: none;
}
#nav ul li a:hover {
width: 100%;
height: 100%;
padding: 8px 20px 6px 20px;
background-image:url('http://leongaban.com/_stack/background_padding/assets/images/bg_nav_hover.gif');
}
Here you go. Changed some css.
You had padding on the li when it should’ve been on the anchor.
Changed your li’s to float left instead of display:inline;
Made background-image to background and added a x-axis repeat.
http://jsfiddle.net/G9dFa/6/