Hi,
I've a big image and I'd like to add a part of that image to a button. I've a css class that defines the left and top where the little part of the whole image I want is located. Let's say
.image
{
left: -20;
top: -200px;
}
I've defined another class that describes the place where I want to put this part of the image.
.image16x16
{
overflow:hidden;
position:relative;
height:16px;
width:16px;
}
Now I'm trying to do something like this:
<button class='image16x16' type='button'><img class='image' src='image.png'/></button>
But the image is moved outside the area reserved. However, if I change the button to be a simple div or input, the image is place correctly.
<div class='image16x16' type='button'><img class='image' src='image.png'/></div>
Thanks.