I have a weird issue using background-position.. Simply it’s not working !
Here’s my code :
<div id="follow-wrapper">
<p>Follow Us</p>
<ul>
<li><a href="#" id="facebook-img"></a></li>
<li><a href="#" id="twitter-img"></a></li>
<li><a href="#" id="googlplus-img"></a></li>
<li><a href="#" id="linkedin-img"></a></li>
<li><a href="#" id="youtube-img"></a></li>
<li><a href="#" id="rss-img"></a></li>
</ul>
</div>
#follow-wrapper ul li {
display: inline-block;
margin-left:8px;
width: 16px;
height: 16px;
background-image: url('../img/follow.png');
background-repeat: no-repeat;
}
#facebook-img{
background-position: 0px 0px;
}
#twitter-img {
background-position: 0px -26px;
}
#googleplus-img{
background-position: 0px -52px;
}
#linkedin-img{
background-position: 0px -78px;
}
#youtube-img{
background-position: 0px -104px;
}
#rss-img{
background-position: 0px -130px;
}
And here’s the result :

Put the ids on the
litags instead of the anchors. Currently thelitag receives part of the necessary styling such aswidth,background-image, etc… While the anchor tag receives the other piece of the styling, the background positioning. All of these styles should be applied to theli.