|
This script takes simple DIV elements and makes them change state when you mouseover, mouseout, and press on them. All you have to do is create your DIV elements, create 3 stylesheet rules, and run a javascript command for each "class" of button. The example at left is a column of simple buttons that change when you move/press your mouse over them. You'll also notice the text shifts like a normal button would. These attributes are all controlled by the stylesheets you define. |
To the right is another example. The text doesn't shift when you press the buttons though. Notice the last row of text does not do anything even though it looks the same as the rows above? More on that later. |
|
.test { width:150px; text-align:left; color:black; font-size:9pt; font-family:verdana; font-weight:bold; background-color:#FFDDFF; border-color:#FFDDFF; border-width:2px; border-style:solid; padding:4 6 4 6; } |
.testhover { width:150px; text-align:left; color:black; font-size:9pt; font-family:verdana; font-weight:bold; background-color:#FE95FF; border-color:#FE95FF; border-width:2px; border-style:outset; padding:4 6 4 6; } |
.testpress { width:150px; text-align:left; color:black; font-size:9pt; font-family:verdana; font-weight:bold; background-color:#FE95FF; border-color:#FE95FF; border-width:2px; border-style:inset; padding:6 6 2 8; } |