The specificity of your second selector is greater than your first one, so its styles will win out (this is the "cascade" in Cascading Style Sheets, btw). By virtue of that ID being in the selector, it will win out over any selector that contains only elements or classes. Try this:
#container div.color2 a {
background: #f00;
}