graphical buttons: <INPUT> v. <BUTTON>

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • not 2 swift

    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
  • Neal

    #2
    Re: graphical buttons: &lt;INPUT&gt ; v. &lt;BUTTON&g t;

    On Thu, 24 Jun 2004 02:21:26 GMT, not 2 swift <not2swift@eart hlink.net>
    wrote:
    [color=blue]
    > 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[/color]

    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.

    Comment

    • Chris Morris

      #3
      Re: graphical buttons: &lt;INPUT&gt ; v. &lt;BUTTON&g t;

      not 2 swift <not2swift@eart hlink.net> writes:[color=blue]
      > I thought I would update an old page on which I had used a
      > <INPUT TYPE=image ...>
      > with a
      > <BUTTON><IMG SRC=...></BUTTON>[/color]

      Don't. Button support is not particularly good - stick with the more
      reliable Input.
      [color=blue]
      > 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?[/color]

      <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

      Comment

      Working...