Test page:
<!DOCTYPE html>
<html>
<head>
<title>button border hover test</title>
<style type="text/css">
input
{
border: 0;
padding: 0;
}
input:hover
{
background-color: fuchsia;
}
</style>
</head>
<body>
<form>
<input type="button" value="input element" /><br>
</form>
</body>
</html>
The background colour does not change. If you set the padding to anything higher than 0, the background colour does change. I'm not seeing this behaviour in Firefox.
Having a padding of 1px isn't disruptive to the layout, but does anyone know of a way to make this work with 0 padding?
<button type="submit">element? It will work in IE8. labs.findsubstance.com/2009/05/21/…:hoveron<a>elements.