 <p>OP, perhaps you could think of it that CSS processes the first argument (#header, and #login) first, and only after that, then it processes the second argument (a in "#header a").</p> <p>So on the first process, it's made red, and then blue, but on the second process, it's overwritten to red, due to the "a" in the second argument.</p>