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 How to Make a Website Customizing Colors and Fonts Write Hexadecimal Colors

Calvin Secrest
Calvin Secrest
24,815 Points

How to set the color of a paragraph. It say check that you've styled h1 elements to be white with a hexidecimal value.

N/A

css/main.css
a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
}

#logo {
  text-align: center;
  margin: 0;
}

h1, h2 {
  color: #fff;
  color: #000000; 
}

3 Answers

Shawn Boyd
Shawn Boyd
14,345 Points

Hey Calvin,

The problem is with the second 'color' property for the h1, h2 selector. In this CSS the second (i.e later) rule is taking precedence over the first. Meaning that both the h1 and h2 elements are having a color of #000000 (black) applied, rather than #fff (white). Deleting that second color property will solve the problem. In general, you should not have multiple lines/values for the same property within a single selector as only the last one will be applied.

Maxwell DeMers
Maxwell DeMers
6,853 Points

I am also thinking you may have added the second color property to apply a different color to the second header. Remember that selecting two different elements in a css rule causes both elements to be styled the same. So, by using only the first color property, both headers would be colored white in this case.

Calvin Secrest
Calvin Secrest
24,815 Points

@Maxwell when I changed the color property to apply a different color to the second header it asked to double check that you've styled paragraph (p) elements to be black with a hexidecimal value.