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 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    92
    Thanks
    4
    Thanked 1 Time in 1 Post

    Help with an input type

    Hello,

    I am trying to have an input type "image" with some text in it. It is displaying the image but not the text.

    <input type="image" src="images/ships/cockpit_button_small_red.jpg" value="ENEMIES" onClick="window.location.href='index2.php?SCANNER=1'" align="center">

    Is there a way to add the text dynamically to the image or do I have to create an image with the text in it hardcoded?

    Thanks,
    twomt

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    You can't have text in an input type image. Just create an image with the hardcoded text. Or if you want, you can use the <button> tag. It's a button though, but you can insert image and text in it. But via CSS, you can make it look like not a button.
    Code:
    <button onclick="window.location.href='index2.php?SCANNER=1'" style="border:none;background-color:transparent"><img src="images/ships/cockpit_button_small_red.jpg" /><br /><span style="font-size:8px;">ENEMIES</span></button>
    Last edited by glenngv; 05-24-2007 at 05:00 PM.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

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