Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Customizing Colors and Fonts Use Color in CSS

Philip Schultz
Philip Schultz
11,437 Points

Why did you start a new anchor rule for the css color declaration. Why not add the color to the existing rule.

Why have two anchor rules in the main css file to change the color. Couldn't you just ad the declaration to the original rule at the very to of the main.css file

4 Answers

Kevin Korte
Kevin Korte
28,148 Points

Yeah there really was not reason to add the rule again. DRY stands for Don't-Repeat-Yourself, meaning we only want to try to declare everything once in a project.

Its most likely that it has been done this way for you to see how new rules change the elements that previously have been declared. Also take into consideration that after doing all the CSS you DRY the code so you avoid having such things

Are you referring solely to the elements within the header container and why there isn't just one rule for that portion?