This script lets you turn the standard grey form button (or submit button) into any colour, with colour-changing rollover effects on mouseover.
In other words, image rollover effects without images!
Paste the code below in the head section of your page:
Now place the code below into the body section:
How It Works
Both standard and submit buttons have the style sheet class attribute.
This means you can manipulate them using style sheet codes, as you can with hyperlinks, tables, background colours, etc.
Referring to the top script (the style section), the normal state of the button is defined by the name .colornormal, while the mousover state is defined by .colorover.
Since these are user-defined terms, these names must be preceded by a period (.) inside the style tags, but not in the button's body section definition.
All the desired parameters are inside the brackets - the height, width, color, border and font characteristics of the button.
All of these may be modified as desired.
The second script defines the button on your page.
The button is assigned the desired style characteristics using the class command - in this example, colornormal for the button's default state.
On mouseover, this changes to colorover, and on mouseout, it reverts to colornormal.
Experiment by changing each parameter and see the results.