Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


marsha grasett
marsha grasett
9,995 Points

REPLACING THE -9999PX HACK - by Zeldman

I did not know the browser actually draws a giant 9999px box offscreen.

Here is the suggested replacement code.

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

http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ The Comments are worth reading, too.

Any thoughts from our leaders?

5 Answers

Randy Hoyt
Randy Hoyt
Treehouse Guest Teacher

After that post from Zeldman, Paul Irish and some other community leaders did a lot of testing of other techniques. They decided on this technique, which is what I would recommend using now:

.ir {
    font: 0/0 serif;
    text-shadow: none;
    color: transparent;
Rick Yentzer
Rick Yentzer
5,885 Points

I haven't heard of this one. Thanks for posting the link.

Mark Flavin
Mark Flavin
10,199 Points

Excellent technique thanks for sharing.

31,206 Points

Thanks for that information Randy, was able to find the discussion over at github.

Great solution! :)