468,508 Members | 1,467 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,508 developers. It's quick & easy.

graphical buttons: <INPUT> v. <BUTTON>

I thought I would update an old page on which I had used a
<INPUT TYPE=image ...>
with a
<BUTTON><IMG SRC=...></BUTTON>

The problem is that <BUTTON> always provides a shadow/emboss effect.
Can I get rid of that? If the old <INPUT> button has been deprecated in
favor of <BUTTON>, have all it's button functions been duplicated?

Thanks for any help,
John
Jul 20 '05 #1
2 5647
On Thu, 24 Jun 2004 02:21:26 GMT, not 2 swift <no*******@earthlink.net>
wrote:
I thought I would update an old page on which I had used a
<INPUT TYPE=image ...>
with a
<BUTTON><IMG SRC=...></BUTTON>

The problem is that <BUTTON> always provides a shadow/emboss effect.
Can I get rid of that? If the old <INPUT> button has been deprecated in
favor of <BUTTON>, have all it's button functions been duplicated?

Thanks for any help,
John


See http://www.w3.org/TR/html4/interact/...ml#edef-BUTTON -
specifically:

"Visual user agents may render BUTTON buttons with relief and an up/down
motion when clicked, while they may render INPUT buttons as "flat" images."

The browser adds this to the button. Perhaps you can apply a style to the
button element like this:

button {border-style: none;}

but I have not tested this. This assumes the browser applies the box-model
border, which may be erroneous.

BTW input buttons are not deprecated.
Jul 20 '05 #2
not 2 swift <no*******@earthlink.net> writes:
I thought I would update an old page on which I had used a
<INPUT TYPE=image ...>
with a
<BUTTON><IMG SRC=...></BUTTON>
Don't. Button support is not particularly good - stick with the more
reliable Input.
The problem is that <BUTTON> always provides a shadow/emboss effect.
Can I get rid of that? If the old <INPUT> button has been deprecated in
favor of <BUTTON>, have all it's button functions been duplicated?


<INPUT> has not been deprecated. Buttons are generally useful (where
browser support is sufficient) for optionally doing things with
client-side scripting while remaining on the same page - don't use
them to try to duplicate the perfectly good submit functionality of
<input type="submit" ...> or <input type="image" ...>

--
Chris
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by phil_gg04 | last post: by
3 posts views Thread by Lāʻie Techie | last post: by
2 posts views Thread by Richard Maher | last post: by
2 posts views Thread by jp2code | last post: by
5 posts views Thread by =?Utf-8?B?R2VyaGFyZA==?= | last post: by
3 posts views Thread by gieforce | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.