I'm making a sliding door button through sprites and there's one part that is giving me some trouble. Is there any way to set the anchor point AND the background-url image position: So something like this:
background-position: 0 -47px top right;
I'm making a sliding door button through sprites and there's one part that is giving me some trouble. Is there any way to set the anchor point AND the background-url image position: So something like this:
background-position: 0 -47px top right;
No. The dimensions of your "window" need to match the image exactly, otherwise, it will be cut/other images be displayed.
You may not specify where to place the sprite (it kinda beats the purpose).
If width and height of Your anchor are constant then You can use sprite and define coordinates (0 -47px in Your example). If anchor can have various size then I think better will be cut that background as separate image and add 'top right' position for background. As people above me said- there is no way to use both- 0 -47px and top right values.