Posted By

jonathanpglick on 08/13/09


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Hide text on input[type=submit]

 / Published in: CSS

  1. text-indent: -999em; /* Hide the text, works in most modern browsers */
  3. /* --- Needed for IE --- */
  4. font-size: 0px; /* works well in IE7. still a black line (basically the text) in IE6. */
  6. display: block; /* Negative text-indent works in IE(6? worked fine in 7) only if this is added. */
  8. line-height: 0px; /* Another fix for IE6. */

Report this snippet  


RSS Icon Subscribe to comments
Posted By: bambam on August 24, 2009

This is a lifesaving snippet. Thanks!

Posted By: lichta on August 31, 2009

THANK YOU for this code... it took me about an hour of searching to finally find something that worked in IE6. All three IE lines are needed for text to be completely hidden.

You need to login to post a comment.