Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Put image on input button

    Hi,

    If I'm having a input button and I want to change the button to have some image.How can I do that?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi,

    <a href="yoururl" target="_blank">
    <img src="yourimage.jpg" >
    </a>

    use photo editor of your choice to put image on button.

  • #3
    Regular Coder
    Join Date
    May 2002
    Location
    Maine, USA
    Posts
    574
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Put image on input button

    Originally posted by therry
    Hi,

    If I'm having a input button and I want to change the button to have some image.How can I do that?
    Here;s another option you might want to have a look at. It's a tutorial we have on JavaScript Kit regarding the <button> tag...might be worth a l@@K .

    http://javascriptkit.com/howto/button.shtml
    boxer_1
    CodingForums Moderator
    "How did a fool and his money get together in the first place?"

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,959
    Thanks
    0
    Thanked 236 Times in 233 Posts
    if you are talking about submit button, you can use input type=image. This functions the same as the normal submit button but with minor (or major) differences:

    1. it does not fire form onsubmit event.
    2. its name/value pair is not submitted to the server,
    therefore, you will not detect if it's clicked or not
    unless you put a hidden field containing which button is clicked.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As Gelenn said you can use <input type="image" src="..."> or use this:

    <button style="border:0px; background:#FFFFFF"><img src="yourImage.gif"></button>

    This should work......set the bg color of the button to whatever you want.

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,959
    Thanks
    0
    Thanked 236 Times in 233 Posts
    does it work with Netscape?

    Originally posted by premshree
    As Gelenn said you can use <input type="image" src="..."> or use this:

    <button style="border:0px; background:#FFFFFF"><img src="yourImage.gif"></button>

    This should work......set the bg color of the button to whatever you want.

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Should work with NS6, not sure about NS4......

  • #8
    New Coder
    Join Date
    Jun 2002
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is there any trick to insert picture to button

    Hello is there any way in this world to insert picture
    to abutton ?
    css2 ,filters , Behaviors ...any thing go's.....
    tnx

  • #9
    New Coder
    Join Date
    Jul 2002
    Location
    Ireland
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i dont know if this is what u mean but there is a way they this

    <a href="http://www.yourlink.com"><img src="/Image.gif" width="100" height="20" border="0"></a>

    that will make the image a link

    sorry if this is not what u where looking for

  • #10
    New Coder
    Join Date
    Jun 2002
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello tnx for the fast reply
    well no .. this is not what i meant
    i meat say i have : <input type="button">
    is there way to insert in side it as background maybe a-picture
    (jog or gif ..)
    tnx

  • #11
    New Coder
    Join Date
    Jun 2002
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    i found a way...

    background-image style

  • #12
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    This thread was about 10 topics below yours

    Merged
    Zvona
    First Aid for
    Web Design


  •  

    Posting Permissions

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