Search code examples
cssspriterollover

CSS rollover sprites


I have used this effect before, everything is in order (As far as I see), but it's just not working. What have I missed?

Fiddle here

Sprite here

Thanks.


Solution

  • Since your sprite is arranged horizontally, you will want to offset the hover state like this:

    element:hover {
    background-position: -77px 0;
    }