I have the following html inside a <div>:
<span class="footer-icons">
<a href="#;" class="facebook" title="Facebook">Facebook</a>
<a href="#;" class="twitter" title="Twitter">Twitter</a>
</span>
And my CSS:
#footer .footer-icons {
float: right;
margin-right: 10px;
}
#footer .footer-icons {
text-indent: -9999px;
}
#footer .footer-icons .facebook {
background: url("../images/new/footer-icons.png");
}
The problem with this is that the text-indent is causing the background-image to move also. How would I make it such that I can ‘escape the text’ (for example, using text-indent: -9999px) and keep the background image in place?
here is the working fiddle: http://jsfiddle.net/surendraVsingh/qdFNM/5/ (Updated)
Add display:inline-block & give a width & height to that div same as image.
CSS