I have a beautiful little CSS image that needs to be a button. I\'ve tried about 20 different methods, none of which work. I just either get a blank nothing or a border with no
You can override the style given by the browser to the button.
For example adding this to your css does the trick for me (on Chrome):
.controls input {
background: url(' http://lrroberts0122.github.com/DWS/lab6/level-2/images/button.png') -411px -540px no-repeat;
width: 199px;
height: 109px;
border: none;
}
But really if you are not going to use the browser's css for the button, you should probably not use For example: The html: The javascript (assuming you use jQuery): at all, and just insert the image (via an
tag or a
$('.controls img').click(function(){... stuff to do...});