I've always tought that css rules is applied in the order they are defined in an external style sheet file or in the <style> tag, but then I ran into a problem where a generic class that sets the font color wasn't applied to an element inside a div with an id.

Could anyone explain to me why the 4. anchor in this example isn't blue like the 2. anchor that has the same class?

Example