Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Signature-free discourse for serious web publishers > YOUR CREATION: Building & Maintaining A Web Site > Web Development - Programming / Coding
User Name
Password
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-31-2001, 04:52 PM   #1
trix999
Registered User
 
Join Date: Jun 2001
Posts: 32
Question Submit Button

How can I change the colours of a submit button (from a form) ? I don't want the button to be an image, just the button, but with different colours.

THX in advance.
trix999 is offline   Reply With Quote
Old 07-31-2001, 05:46 PM   #2
Manos
Registered User
 
Join Date: Feb 2001
Location: BC,Canada
Posts: 72
Default

trix,

You can do it with cascading style sheets (CSS). I'm no expert on these things, but I use one with my site. To make your buttons change colors, etc, you could define a style sheet (either in your HTML, or as I prefer, in a different file which you include).

For instance, you could define this in a file called "main.css":

input.button_1 {
background-color: #000000;
color: #ff0000;
**

That sets up a "class" attribute called "button_1", which applies to any HTML element of type "input" (including buttons, checkboxes, text fields, etc.) There's a ton of other properties of the button you could modify, such as borders and fonts

To make your button "use" that style, you need to do 2 things. You have to include the style sheet into your HTML, and you have to create your button and tell it to utlilize that style.

For instance, you could put this in the <HEAD> area of your HTML:
Code:
<LINK REL="Stylesheet" TITLE="Main Stylesheet" MEDIA="Screen" HREF="main.css">
Then, when you make your button, you'd do this:

Code:
<input type="submit" name="Submit" value="Click me!" class="button_1">
That's about all I know about style sheets. You should check out http://www.webreference.com/html/tutorials/, I believe there's some neat CSS stuff there.
Manos is offline   Reply With Quote
Old 08-01-2001, 05:32 AM   #3
LastActionHero
Registered User
 
LastActionHero's Avatar
 
Join Date: Jun 2001
Location: New Delhi, India
Posts: 615
Default

The above workd only with IE 5 and above and Netscape 6
LastActionHero is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
make image submit button rizguine Web Design and Webmaster Issues 2 04-17-2006 02:58 PM
change how width a submit button is Scuba Web Development - Programming / Coding 10 10-26-2002 11:05 AM
How to use my own image instead of the usual submit button? lighter Web Design and Webmaster Issues 2 06-24-2001 11:29 PM
Image button w/ Submit value DJ_B Web Design and Webmaster Issues 3 10-31-2000 07:35 AM
Submit 2 forms with one click?? -----please help --- urgent CYBERWORLD Web Design and Webmaster Issues 0 01-22-2000 04:40 AM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 04:19 PM.


GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.