I am trying to move a piece of text on a specific part of image using css sprites.But the background position I am applying doesn't seem to work. I have tried changing the background position but the text part(i.e. twitter, facebook) doesn't move to the correct place.
#fixedsocial {
background:url("../img/socials/icon.png") no-repeat;
top:40%;
width:50px;
height: 100px;
position:fixed;
left: 0;
display: block;
z-index: 1000;
background-color: #eee;
text-indent:-9999px;
}
.facebookflat {
background-position: -200px 0;
height:50px;
}
.facebookflat:hover {
cursor: pointer;
}
.twitterflat {
height:50px;
background-position: -400px 0;
}
.twitterflat:hover {
cursor: pointer;
}
<div id="fixedsocial">
<div class="facebookflat" id="shareBtn"></div>
<div class="twitterflat"> <a href="https://twitter.com/share" data-show-count="false"></a> </div>
</div>