CSS practices: negative positioning

Posted by Corey on Programmers See other posts from Programmers or by Corey
Published on 2011-02-06T01:07:07Z Indexed on 2011/02/06 7:33 UTC
Read the original article Hit count: 470

Filed under:
|

I'm somewhat of a novice to CSS.

Anyway, I noticed that an extremely common method used in CSS is to have negative or off-screen positioning, whether it be to hide text or preload images or what have you.

Even on SE sites, like StackOverflow and this website, have

#hlogo a { text-indent: -999999em } 

set in their CSS.

So I guess I have a few questions.

  • is this valid CSS? or is it just a "hack"?
  • are there downsides to doing things this way?
  • why is this so common? aren't there better ways to hide content?

© Programmers or respective owner

Related posts about best-practices

Related posts about css