If you’re a website builder you’re most likely familiar with the “negative text indent technique”, a method commonly used to hide text in an element by pushing it off the screen.
Example:
.hidden-text {
text-indent-9999px
}
Well there’s a new technique in town, promoted over at the zeldman website. Here is the new CSS code to use instead to hide the text:
.hidden-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
More lines of text? True. The thought behind the method is that performance will be increased because now the browser isn’t drawing a “9999px” box.
Thanks:
Scott Kellum
Zeldman





