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! While you're at it, check out some resources Treehouse students have shared here.
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 trialmarsha grasett
9,995 PointsREPLACING 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
Treehouse Guest TeacherAfter 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
5,885 PointsI haven't heard of this one. Thanks for posting the link.
Mark Flavin
10,199 PointsExcellent technique thanks for sharing.
samiff
31,206 PointsThanks for that information Randy, was able to find the discussion over at github.
Duncan Michael-MacGregor
15,204 PointsGreat solution! :)