We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

1man on 09/21/07


Tagged

image replace button submit


Versions (?)


Who likes this?

8 people have marked this snippet as a favorite

jonhenshaw
basicmagic
markupmark
marcoba
vali29
gAmUssA
asturi
monapdx


Image Replace for Buttons


Published in: CSS 


This allows you to replace the bog standard browser button (form buttons) with any image you wish.

  1. #submitButton {
  2. width: 38px;/* Width of button image */
  3. height: 19px;/* Height of button image */
  4. padding: 30px 0 0;
  5. margin: 0;
  6. border: 0;
  7. background: transparent url(images/buttonimage.gif) no-repeat;
  8. overflow: hidden;
  9. cursor: pointer; /* hand-shaped cursor */
  10. cursor: hand; /* for IE 5.x */
  11. }

Report this snippet 

You need to login to post a comment.