By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,676 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,676 IT Pros & Developers. It's quick & easy.

graphical buttons: <INPUT> v. <BUTTON>

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.