CSS: How to hide text

…when you just want to show an image (but you can't or shouldn't delete the text). I use this when I want to use a button image and not show the text at all when using an "a href" link.

I've used that -9999px hack before. The following one seems less extreme.

text-indent: 100%;
white-space: nowrap;
overflow: hidden;

#css

Embedded Link

Replacing the -9999px hack (new image replacement) – Jeffrey Zeldman Presents The Daily Report
The Daily Report’s 2003 redesign uses (and our book explained) an image replacement technique intended to combine the benefits of accessibility with the power of graphic design. We christened this method Fahrner Image Replacement (FIR) in honor of Todd Fahrner, who first suggested it to us.

Google+: View post on Google+

Leave a Comment