18.07.2011 18:38, onno de jong wrote:

In the following example: http://circularcreation.com/sprites.html
> I've created a single image rollover using a sprite, but when
> I duplicate that (3x) and give each link a different id and then
> update the coordinates, the other three do not show up.

If you use the W3C CSS Validator on your stylesheet, it says things like

"Value Error : background Too many values or values are not recognized : url('images/sprite-example.png') no-repeat -24px ýýý181px url('images/sprite-example.png') no-repeat -24px ýýý181px"

This may look mystic, but the Validator just doesn't process UTF-8 data properly. What it renders as ýýý is actually MINUS SIGN U+2212, which is not allowed in CSS. Replacing the minus signs by common hyphens (the ASCII hyphen, i.e. HYPHEN-MINUS U+002D, fixes the problem.

The minus sign can be visually very similar or even identical to the common hyphen, depending on the font.

In firebug, it shows the background properties of the other three are
> missing from the CSS, and in Chrome, Inspect Element, they are crossed out.

That's understandable and correct, as CSS error handling rules require the entire declaration to be ignored when there is a value error.

I have no idea where the minus signs have come, but maybe some editor or other tool automatically converts common hyphens to minus signs. In human-readable text, the minus sign is in many ways superior to the use of the common hyphen as the sign of negative numbers. But almost all computer languages use the common hyphen as the negation and subtraction operator, not the minus sign.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to