CSS background positioning with sprites

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).

No. "top" and "right" are just aliases for the values 0 and 100%.

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.

Need Your Help

CSS file not recognized by inspect elements - mystery

css elements inspect

The strangest thing is happening since a few days. Inspect element doesn't recognize a css file anymore (See attached image). Somehow the css file gets listed as an image.

Why does JIT order affect performance?

c# .net performance compiler-construction jit

Why does the order in which C# methods in .NET 4.0 are just-in-time compiled affect how quickly they execute? For example, consider two equivalent methods:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.