Posted By

Narayon on 04/03/12


Tagged

css images hacks


Versions (?)

Replacing the -9999px hack


 / Published in: CSS
 

URL: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/

The alt property of the img tag is also a good practice.

  1. #1---
  2. .hide-text {
  3. text-indent: 100%;
  4. white-space: nowrap;
  5. overflow: hidden;
  6. }
  7.  
  8. #2---
  9. //with alt property
  10. <h1><a href="/"><img src="logo.png" alt="My Site Title" /></a></h1>
  11.  
  12. #3---current
  13. .ir{
  14. border:0;
  15. font: 0/0 a;
  16. text-shadow: none;
  17. color: transparent;
  18. background-color: transparent;
  19. }

Report this snippet  

You need to login to post a comment.