Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

I want to use a graphic instead of an Select Button

  • 27-10-2006 12:34PM
    #1
    Registered Users, Registered Users 2 Posts: 224 ✭✭


    Hi,

    Im sure this is simple enough to do but Im stuck. I have to images called reset.jpg & submit.jpg. I want to use these in the place of normal form reset & submit buttons. What is the proper coding for this...anybody?


Comments

  • Registered Users, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    Use CSS.

    [html]
    <style type="text/css">
    input#submit_button {
    background-image(url: images/submit.jpg);
    height: 15px;
    width: 40px;
    }
    input#reset_button {
    background-image(url: images/reset.jpg);
    height: 15px;
    width: 40px;
    }
    </style>

    ...

    <input type="submit" id="submit_button">  <input type="reset" id="reset_button">
    [/html]

    The width and height properties for each button should be set to the width and height of the image being used. If a browser doesn't support these properties on an input button, then they should just display the default buttons.


Advertisement