...

View Full Version : Help with an input type



twomt
05-24-2007, 02:45 PM
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

glenngv
05-24-2007, 04:56 PM
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.

<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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum