Code won't show button image

Discussion in 'HTML & Website Design' started by Dee2007, Oct 1, 2008.

  1. #1
    Hi All :)

    I am using Mals and want to add my own button, I used this code initially and the button shows up fine.

    <input type="image" src="8.jpg" border="0" />

    However reading though the forum it was recommended to use an alternative code to add the submit part :

    <input type="submit" src="8.jpg" border="0" />

    But now it doesn't work, I now just get the standard query button?

    Can anyone please advise :)

    Thanks

    Dee
     
    Dee2007, Oct 1, 2008 IP
  2. seokochin

    seokochin Banned

    Messages:
    298
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You may use CSS for this.
     
    seokochin, Oct 1, 2008 IP
  3. dwayne12

    dwayne12 Well-Known Member

    Messages:
    184
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Try this instead

    <button type="submit"><img src="8.jpg" /></button>

    If you want to use <input type="submit id="submit_button" /> you will need to use CSS to style it.

    Something like this:

    #submit_button {
    border: 0;
    padding: 0;
    margin: 0;
    background: url(8.jpg) no-repeat;
    height: your images height;
    width: your images width;
    }

    In my opinion, the <button></button> approach is easiest.
     
    dwayne12, Oct 1, 2008 IP
  4. dragonlove

    dragonlove Active Member

    Messages:
    145
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    yes , Indeed , css is easy that way
     
    dragonlove, Oct 1, 2008 IP
  5. Dee2007

    Dee2007 Active Member

    Messages:
    1,185
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    88
    #5
    Hi , thanks guys

    I tried the first option and the button showed up but it was huge and the background was grey.

    Can someone show me how to change the below to incorporate the css above into this code

    <form action="http://ww11.aitsafe.com/cf/add.cfm"; method="post">
    <input type="hidden" name="userid" value="000000">
    <input type="hidden" name="product" value="Item Name or Number Here">
    <input type="hidden" name="price" value="1.99">
    <input type="hidden" name=qty value="1">
    <input type="hidden" name="return" value="http://www.mysite.com.html">;
    <button type="submit"><img src="8.jpg" /></button>


    Thanks in advance

    Dee
     
    Dee2007, Oct 2, 2008 IP
  6. Dee2007

    Dee2007 Active Member

    Messages:
    1,185
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    88
    #6
    Anyone :)

    Dee
     
    Dee2007, Oct 2, 2008 IP