I'm building a responsive website which has a standard navigation. Each <li>
element has a background image, like so:
CSS
.container {
width: 960px;
max-width: 90%;
margin: 0 auto;
}
ul {
width: 100%;
}
li {
float: left;
width: 16%;
list-style: none;
text-align: left;
background: url(http://bit.ly/1D60g6m) no-repeat 68% 0;
background-size: 10%;
}
HTML
<div class="container">
<nav>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
</ul>
</nav>
</div>
My background-position
roughly aligns the background image to the middle of each <li>
.
As you reduce the viewport width, the image is no longer aligned to the middle. This is more noticeable when I use different background images for each <li>
.
Is there a better way I can align the background image to the whitespace between each <li>
?