Posted By

skopp on 08/29/12


Tagged

hide text indent cxs


Versions (?)

hide text indent trick thingy for css


 / Published in: CSS
 

URL: http://www.djavupixel.com/development/css-development/master-css3-ultimate-css-code-snippets/

Hiding text can be extremely useful to hide company logo. As logos are usually an image, you will want to use text indent to place it in a h1 tag for SEO (Search Engine Optimization). The technique we use is to hide the text far away off the screen, and apply a background image instead.

  1. h1 {
  2. 2
  3. text-indent:-9999px;
  4. 3
  5. margin:0 auto;
  6. 4
  7. width:400px;
  8. 5
  9. height:100px;
  10. 6
  11. background:transparent url("images/logo.jpg") no-repeat scroll;
  12. 7
  13. }

Report this snippet  

You need to login to post a comment.