HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Using a css generated button as a form submit button
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
Pluribus



Joined: 29 Jul 2009
Posts: 1

PostPosted: Wed Jul 29, 2009 8:09 am     Using a css generated button as a form submit button Reply with quote

Hi everyone

I am coding an ecommerce site that uses a css generated image as an add to cart button. I need to find a way of using that same image as a submit button on a web form I have already created.

The code for the form with the normal style submit button is this:

<form action='http://www.romancart.com/cart.asp' method=post>
<input type=hidden name=itemcode value='ITEM1'>
<input type=hidden name=storeid value='458962'>
Modifiers <select name=itemname2><option value='Medium'>Medium</option><option value='Large'>Large</option><option value='Extra Large'>Extra Large</option></select><br>
Modifiers <select name=itemname3><option value='Black'>Black</option><option value='Olive'>Olive</option><option value='Navy'>Navy</option></select><br><br>
<input type=submit value='Add to basket'>
</form>

On the site, the code to generate the add to basket image is simply <class="addtocart">

I have tried to do this as many ways as I can think of but the best I can do is display the add to cart image and a submit button next to it which looks really ugly and does not do what I want.

Can anyone please help me??

I would really appreciate any suggestions anyone has.

Regards

Ian
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

PostPosted: Wed Jul 29, 2009 9:51 am     Reply with quote

Is this what you are talking about?
Code:
<button name="submit" value="submit" type="submit">SEND<br><img src="imagepathhere" alt=""></button>


Or this?
Code:
<form action="input"><div>First name: <input type="text" name="firstname" style=" width: XXpx; height: YYpx; background:#000 url(path to imagefilename.png);"></div></form>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial