Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Image *in* (not as) submit button

Options
  • 14-10-2005 10:06am
    #1
    Closed Accounts Posts: 8,478 ✭✭✭


    Lew

    Any way of insterting an image within the standard form button? What I dont
    want to do is create an image with the icon and the text of each freakin button.

    Cheers


Comments

  • Moderators Posts: 6,862 ✭✭✭Spocker


    Don't think so. I think it's only one or the other, button with text or image of your choice.


  • Registered Users Posts: 2,157 ✭✭✭Serbian


    You can set a background image for a submit button. You need to set the background color to transparent and the border to 0. I have tested this on Firefox 1.0.7 and IE6 and it works. I'll test other browsers and let you know the results.
    <input type="submit" name="Submit" value="Submit" style="background-image: url(images/background.gif); background-color: transparent; border: 0;" />
    

    Compatibility: Suprisingly, it actually works with nearly every browser I tried it with. IE 5.01, IE 5.5, IE 6.0, Opera 8.5, Firefox 1.0.7, Netscape 7.2, K-Meleon 0.8.2. That's probably about 90% of all people who are likely to view it. The transparent background and background image worked on Opera 7.54 but the border was still around the button. There probably is a way to fix that, but it doesn't immediately come to mind.


  • Closed Accounts Posts: 8,478 ✭✭✭GoneShootin


    Serbian that's fantastic. Thanks very much!

    Do you accept paypal ? ;)


  • Registered Users Posts: 2,157 ✭✭✭Serbian


    Serbian that's fantastic. Thanks very much!

    Do you accept paypal ? ;)

    Just glad to help :)


  • Registered Users Posts: 2,660 ✭✭✭Baz_


    Serbian wrote:
    Just glad to help :)
    You should have said yes!


  • Advertisement
Advertisement