One way to do it is to set the image you want to display as a background in a container (td, div, span etc) and then adjust background-position to get the sprite you want.
This technique is shown on the following url:
Espo
2008-09-11 21:37:29