Posted By

mjenos on 04/06/12


Tagged

css


Versions (?)

CSS hide text


 / Published in: Other
 

  1. -9999PX
  2. So popular was this method, we made a tee shirt out of it, and it sold, baby, it sold.
  3.  
  4. But despite its enduring popularity, Phark has drawbacks of its own: chiefly, a performance hit caused by the need to draw a giant 9999px box offscreen. (Yes, the browser really does this.)
  5.  
  6. My friend Scott Kellum, design director at Treesaver, has now sent me this refactored code for hiding text, which I hereby christen the Kellum Method:
  7.  
  8.  
  9. .hide-text {
  10. text-indent: 100%;
  11. white-space: nowrap;
  12. overflow: hidden;
  13. }

Report this snippet  

You need to login to post a comment.