An element's final style is determined by "cascading" all the style rules that match. When multiple matching rules set the same property, the most specific selector wins.