Collected by Elizabeth Janson Home Page |
|
Set up these two sets of code in the <HEAD>
FORM commands create the button process.<STYLE> .start {color:yellow; background:navy} .end {color:blue; background:plum} </STYLE> <SCRIPT LANGUAGE="javascript"> function highlightButton(s) { if ("INPUT"==event.srcElement.tagName) event.srcElement.className=s } </SCRIPT> NAME=highlight connects this button to the JavaScript above. Look again at the script. You'll see the word "highlight" in there, too.<FORM NAME=highlight onMouseover="highlightButton('start')" onMouseout="highlightButton('end')"> <INPUT TYPE="button" VALUE="Click me to go home to www.htmlgoodies.com" onClick="location.href='http://www.htmlgoodies.com'"> </FORM> INPUT TYPE="button" is basic HTML to create a button. VALUE="--" puts the text on the button. onClick= is JavaScript to alert the browser to do something when the button is clicked. In this case I have it set to send the browser to the location.href of HTML Goodies. See that above? You can change out where this button points to by simply changing out the URL to Goodies with your own.
This time I try some more ideas, without the help of Java Script.
The Button The HTML:
<span class="cssbutton"><span class="buttonleft">css</span> The CSS: .cssbutton { background: #fff; padding: 1px; font-family: Geneva, Vera, Arial, Helvetica, sans-serif; font-size: x-small; font-variant : small-caps; border : 1px solid #aaa; } .buttonleft { color: #f8f8f8; background: #a42; padding: 0px 3px 0px 3px; } .buttonright { color: #f8f8f8; background: #886; padding: 0px 20px 0px 3px; }
|
Email CSS begins here |
|
This page is part of Elizabeth Janson's web site
http://www.oocities.org/elizatk/index.html
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |