views:

93

answers:

3

I do want to show just text inside an INPUT. So, How can I do it?

<p><input type="image" src="" border="0" name="submit" alt="Donate"></p>

Basically, It works good but Safari and Chrome does not display the alt="Donate. Instead, it shows an empty square.

Edited: I have used this code from bobince:

 <input type="submit" class="unbutton" value="Donate">

.unbutton {
    color: black; background: none;
    border: none; padding: 0; margin: 0;
    overflow: visible;   /* this is an IE hack to avoid extra button width */
}

Then, How can I display the word Donate? I do not want to use an images. I want to use just text to show Donate

PS: I am dealing with PayPal's donation button.

Answer: I have forgot to add value="Donate" :P

+4  A: 

Why are you using input type="image"?

How about something like this:

<p><input type="submit" name="submit" value="Donate"></p>
Paul Schreiber
...and if you *actually* want a background image, use CSS `background-image` instead.
BalusC
A: 

I don't think you want to be doing what you are doing here. You are effectively making a dead image link here.

Rather than that, if you are trying to do a submit button or something, use the proper HTML type for this.

Mitchel Sellers
+5  A: 

It's bad behaviour from WebKit that it doesn't show the alt text, but even so you shouldn't be deliberately using a broken image.

If all you want is a submit button without the button styling, you can do that with CSS:

<input type="submit" class="unbutton" value="Donate">

.unbutton {
    color: black; background: none;
    border: none; padding: 0; margin: 0;
    overflow: visible;   /* this is an IE hack to avoid extra button width */
}
bobince