Where there's a will there's a way.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title></title>
<style type='text/css' media='screen'>
a#button {
border: 1px solid black;
padding: 5px;
width: 50px;
height: 20px;
}
a#button:active {
margin: 10px 0 0 10px;
background: orange;
}
div {
margin: 10px;
padding: 5px;
}
</style>
</head>
<body>
<div>
<a href='Javascript:void(0);' id='button'>
Submit
</a>
</div>
Test
</body>
</html>
This does the effect with
no javascript. It works better if you aren't using an <a> (anchor) element, such as with a <div> but IE doesn't recognize the :active pseudo-class on anything but the <a> element, Mozilla, Opera etc do. IE also has a nasty habit of clipping top and bottom borders on inline elements like <a>, that's why I've enclosed it with a <div> and put some text underneath of it.
hth!
Regards,
Rich
::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::