/ Published in: CSS
Sometimes you can't use an image button, you have to use a submit button, but you still want to hide the text and show an image instead.
The width and height can be changed, of course. The point is that they are specified.
Display:block is needed for IE, according to the original article. Not sure if the font-size and line-height are strictly needed; I didn't test extensively.
The width and height can be changed, of course. The point is that they are specified.
Display:block is needed for IE, according to the original article. Not sure if the font-size and line-height are strictly needed; I didn't test extensively.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
.submitbutton { display:block; width:100px; height:25px; background-image:url(image.jpg); background-repeat:no-repeat; text-indent:-999px; font-size:0px; line-height:0; }
URL: http://www.productivedreams.com/ie-not-intepreting-text-indent-on-submit-buttons/