iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Closed Thread
 
LinkBack (1) Thread Tools
Old April 21st, 2005, 07:50 AM   1 links from elsewhere to this Post. Click to view. #1
New Member
 

Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 CherishedSites is on a distinguished road
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!
CherishedSites is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 21st, 2005, 08:12 AM   #2
New Member
 

Join Date: Apr 2005
Location: Llanelli, South Wales
Age: 29
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 markj is on a distinguished road
if you just want the word submit you could just put a normal link

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

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

Mark
markj is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 21st, 2005, 10:11 AM   #3
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,133
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
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:
 <input type="submit" name="mySubmit" value="Submit" id="MySubmit" />
You can then alter the properties via CSS:-
Code:
#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:
#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 - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 21st, 2005, 10:52 AM   #4
New Member
 

Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 CherishedSites is on a distinguished road
Thanks guys. I went with what Rob suggested and it's perfect.

Thanks again!
CherishedSites is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 21st, 2005, 11:48 AM   #5
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,133
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
BTW mark....

Welcome to the forums... just noticed it was your first post... hope I have not put you off.
__________________
Rob - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 21st, 2005, 05:28 PM   #6
New Member
 

Join Date: Apr 2005
Location: Llanelli, South Wales
Age: 29
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 markj is on a distinguished road
Hi rob,

No you haven't put me off.

Mark
markj is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Bookmarks

Tags
changing , look , forms , submit , button


LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/html-xhtml-and-css/2143-changing-the-look-of-a-forms.htm
Posted By For Type Date
alsmeydh's Bookmarks on Delicious This thread Refback August 27th, 2008 11:32 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Your Design and Layout 4 September 6th, 2007 03:22 PM
How can I use a graphic as submit button Sporky HTML, XHTML and CSS 2 April 17th, 2007 11:56 AM
submit button changes when clicked troublesomegirl JavaScript 0 February 17th, 2007 10:10 PM
Form Submit button Help!!! Aaron1988 HTML, XHTML and CSS 2 November 25th, 2006 10:51 AM


Search Engine Optimization by vBSEO 3.2.0 RC8