Best Image Replacement Technique
Posted
by Josh Stodola
on Stack Overflow
See other posts from Stack Overflow
or by Josh Stodola
Published on 2009-08-04T03:54:33Z
Indexed on
2010/04/14
13:13 UTC
Read the original article
Hit count: 350
css
|image-replacement
What is the best (as in cross-browser) technique to do image replacement in CSS? I am using sprites to do my navigation, but I want the markup to remain SEO friendly. Given the following HTML structure...
<div id="menu">
<ul>
<li><a href="#">Test</a></li>
<li><a href="#">Tester</a></li>
<li><a href="#">Testing Testing</a></li>
</ul>
</div>
What is the best way to replace the text with a background image using CSS only?
I am currently using this...
text-indent: -9999px;
But, it fails with CSS on, and images off.
© Stack Overflow or respective owner