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

CSS

Use Color in Css video -- question about the declaration to add color to links

at time 2:52 in Use Color in CSS video, Nick begins adding a color declaration to the anchor element... Since there is already an anchor element referenced above in the file (with the declaration), would it be permissible--and would it work the same to add the color declaration, like so (I'm using a different color)? like this :

a {
  text-decoration: none;
  color: #CC0000;
}

1 Answer

Hi Fred,

Your code would be fine. The css that you write will override the code above it.
But you might as well just change the code that is already there if all your doing is changing the colour you want the links to be, no need to have the same code with two different values in your css.

Here is a link to explain how to use Markdown to post your code How to post code

If you look at the bottom of the box when your typing a reply you will see Markdown Cheatsheet that will also explain how to post your code.

Hope this helps.