CSS input submit background image


/ Published in: CSS
Save to your folder(s)

Taken from (http://jc-designs.net/blog/2009/08/background-image-on-submit-button-in-ie6/)


Copy this code and paste it in your HTML
  1. .submit {
  2. height: Xpx;
  3. width: Xpx;
  4. background-color: transparent;
  5. /*gets rid of the white background color that
  6. is there by default*/
  7. background-image: url(../images/image.png);
  8. _background-image: url(../images/image.gif);
  9. background-repeat: no-repeat;
  10. border: none;
  11. text-indent: -5000px;
  12. text-transform: uppercase;
  13. /*don't ask, but this gets rid of the
  14. dash in IE7 and 6*/
  15. _display: block;
  16. /*displays the image in IE6*/
  17. _font-size: 0px;
  18. /*gets rid of the value because apparently the
  19. text-indent doesn't do a damn thing in IE6*/
  20. }

URL: http://jc-designs.net/blog/2009/08/background-image-on-submit-button-in-ie6/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.