View Full Version : Changing "Submit" form button to an image
zetetic
06-22-2004, 03:56 AM
I have a couple form submit buttons that came along with a mod I just installed that I want to replace with graphic images. I'm pretty sure there's a little Javascript workaround to make that happen I just don't quite get how to make it work. Any ideas?
Here's the code currently:
<form method="post" action="journal.php?$session[sessionurl]do=comments&journalid=$journalid">
<input class="button" type="submit" value="Show comments" /></form>
tnguy3n
06-22-2004, 11:42 AM
I think you can use CSS to do that job.
To replace all buttons with image, add following to .button field (Main CSS)
width: 75px;
height: 15px;
margin: 0;
border: 0;
background: transparent url(images/path/button.gif) no-repeat;
adjust width & height to your values
or to replace certain button, for example that one above
<input type="submit" value="" style="width: 75px; height: 15px; margin: 0; border: 0; background: transparent url(images/path/button.gif) no-repeat;" />
zetetic
06-24-2004, 04:36 AM
That works really well, tnguy. Thanks. :)
Javierogo
10-30-2009, 10:49 PM
Hi guys, do you know tnguy3n or somebody know, how to make this submit button change something on mouse over? I don't know ... border or color.
;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.