Changing the look of a form's Submit button

This is a discussion on "Changing the look of a form's Submit button" within the Web Page Design section. This forum, and the thread "Changing the look of a form's Submit button are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 21st, 2005, 10:50
Junior Member
Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Changing the look of a form's Submit button

Hi,

Does anybody know how to change the look of a Submit button on a standard HTML form?
Instead of the normal button I want to have just text saying "submit". Is it perhaps a play around with the CSS that is necessary? If it is, i might aswell ask this in the CSS forum.

Thanks!

  #2 (permalink)  
Old Apr 21st, 2005, 11:12
Junior Member
Join Date: Apr 2005
Location: Llanelli, South Wales
Age: 28
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to markj Send a message via MSN to markj Send a message via Yahoo to markj
if you just want the word submit you could just put a normal link

Code: Select all
submit
and have a little script that does the submitting i.e.

Code: Select all
function sub(){
document.<form-name>.submit();
}
Obviously change <form-name> to whatever your form is called and that should be it.

Mark
  #3 (permalink)  
Old Apr 21st, 2005, 13:11
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
I would definitly NOT do what mark has suggested.
NEVER use javascript unless it's absolutly nessesary.

Give your submit button an ID like this:-
Code: Select all
 <input type="submit" name="mySubmit" value="Submit" id="MySubmit" />
You can then alter the properties via CSS:-
Code: Select all
#mySubmit{
background-color:red; color:red; border:1px black dashed
}
You can even use CSS to set a background picture should you wish to use an image.

If you do in fact want just text (as Mark suggested), a far better way would be to make it 'appear' like a link and still keep the 'submit' function within the boundarys of normality:-
Code: Select all
#mySubmit {
background-color:transparent;
color:blue;
text-decoration:underline;
cursor:hand;
border:0 transparent none;
}
Hope this helps.

Changing the appearance of your submit button with CSS will ensure that the submit button functions normally when javascript or CSS support is not present.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #4 (permalink)  
Old Apr 21st, 2005, 13:52
Junior Member
Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks guys. I went with what Rob suggested and it's perfect.

Thanks again!
  #5 (permalink)  
Old Apr 21st, 2005, 14:48
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
BTW mark....

Welcome to the forums... just noticed it was your first post... hope I have not put you off.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #6 (permalink)  
Old Apr 21st, 2005, 20:28
Junior Member
Join Date: Apr 2005
Location: Llanelli, South Wales
Age: 28
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to markj Send a message via MSN to markj Send a message via Yahoo to markj
Hi rob,

No you haven't put me off.

Mark
Closed Thread

Tags
changing, look, forms, submit, button

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit button problems lucyhjones Starting Out 4 Sep 6th, 2007 18:22
How can I use a graphic as submit button Sporky Web Page Design 2 Apr 17th, 2007 14:56
submit button changes when clicked troublesomegirl JavaScript Forum 0 Feb 18th, 2007 01:10
Form Submit button Help!!! Aaron1988 Web Page Design 2 Nov 25th, 2006 13:51


All times are GMT. The time now is 08:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43