SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2002
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    images for submit buttons

    hey, i'm trying to get an image to be appear in my submit button without having to change the input type to 'image'. my form needs to have a submit, and i want to make my form look nice.

    any suggestions?

  2. #2
    SitePoint Addict mixmastermidori's Avatar
    Join Date
    Sep 2001
    Posts
    337
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you want to change the input type? As far as I know, that's the only way to have an image as your submit button.

    -Midori
    Nature's Sunshine herbs and supplements

  3. #3
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree that that's an odd request. In any event, you can use HTML 4's <BUTTON> tag and place an image in it (as well as text, <TABLE>s, and just about anything else except form controls and anchors). I don't think it's that widely supported, though. If you want to get rid of the standard button appearance, you should be able to use CSS in conjunction with it, too. :-)

    ~~Hope This Helps

  4. #4
    SitePoint Zealot
    Join Date
    Feb 2002
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Ian Glass
    I agree that that's an odd request. In any event, you can use HTML 4's <BUTTON> tag and place an image in it (as well as text, <TABLE>s, and just about anything else except form controls and anchors). I don't think it's that widely supported, though. If you want to get rid of the standard button appearance, you should be able to use CSS in conjunction with it, too. :-)

    ~~Hope This Helps
    true. i know i could just change the appearance using CSS. i'm just trying to get a form i've used in PHP to have a image for the submit button rather than an ugly browser created submit button.

  5. #5
    1-800-JMULDER JMulder's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,745
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then I'd suggest you change the input type to image.
    Jeroen Mulder

    w: www.jeroenmulder.com

  6. #6
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by JMulder
    Then I'd suggest you change the input type to image.
    Ditto on that. I'm not sure what's the holdup for you, though. Could you explain it more?

  7. #7
    1-800-JMULDER JMulder's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,745
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One last reply today

    Depending how much you want to modify it, you might want to look into the different styles you can give to a button. You can change background color, border weight or a dotted border. You can give it an icon etc.
    Jeroen Mulder

    w: www.jeroenmulder.com

  8. #8
    SitePoint Zealot zook's Avatar
    Join Date
    May 2001
    Location
    Houston, tx
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <input type="image" src="image.gif">

    it's supported, and it works, why not do it?

    the only reason why you wouldn't want to do that is maybe you want like an image rollover effect. i'm not sure how to do that with form buttons as i've never done it, maybe someone can explain that.

    i should also clarify that, <input type="image"> works the same as <input type="submit">...the only difference is with <input type="image">, the browser displays the image of your choice rather than creating a button.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •