Replacing The -9999px Hack

posted March 2, 2012 #

If you're a web developer of any sort, you likely know the "-9999px" text indent trick to make block level elements contain crawlable SEO text but actually display graphics of some sort. It's a pretty standard undertaking but definitely a "hack." Zeldman suggests that it is time to replace that technique in favor of The Kellum Method.. which looks like this:
.hide-text {
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
}
This kind of hackery will probably fall by the wayside as @font-face gains prominence but it's nice to have a way to achieve the same ends that doesn't require the browser to draw a 10,000px wide box with your text way offscreen.

What is it you're looking for?