If one selector is more specific than others, then the more specific rule takes precedent
For example:
Live Example
In the example above #featured
is more specific than .box
so the background-color of the element will be red even though .box
is listed after #featured