The question is that how to position an image obtained from an image sprite, since background-position property has already been used to locate the image from the sprite? For example, in the below code, how could i be able to locate the home obtained from the sprite on the desired position in a web page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
img.home
{
width:46px;
height:44px;
background:url(img_navsprites.gif) 0 0;
}
</style>
</head>
<body>
<img class="home" src="img_trans.gif" width="1" height="1" />
</body>
</html>
where, (img_trans.gif) is a transparent image and (img_navsprites.gif) is an image sprite.
You should move the entire element by setting
position: absoluteand settingtopandleft.