I am struggling to modify the color of an image inside a button.
Here is the image:
https://i.sstatic.net/8aNAf.png
I would like to change the black download button icon to a green icon using CSS or any other method that does not involve recreating it from scratch. Is this possible?
Here is the code:
<button><em class="leftImage"></em>Button<em class='rightImage'></em></button>
button{
margin: 0px;
padding: 0px;
font-family:Lucida Sans MS, Tahoma;
font-size: 12px;
color: #000;
white-space:nowrap;
width:auto;
overflow:visible;
height:28px;
}
button em{
vertical-align:middle;
margin:0 2px;
display:inline-block;
width:16px;
height:16px;
background-image: url(icon_delete.png);
}
button em.leftImage{
background-position: -96px -112px;
}
button em.rightImage{
background-position: -64px -16px;
}
However, the output remains unchanged and the color is still black. https://jsfiddle.net/35kfu6z7/