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 Styling Web Pages and Navigation Make a CSS Image Gallery

text color

it keeps telling me to set the text color but I already have and it doesnt allow me to continue

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

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

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

h1, h2 {
  color: #000;
}

nav a {
  color: #000;
}

nav a:hover {
  color: #32673f;
}

h1 {
  font-family: Changa One, sans-serif;
  font-size: 1.75em;
  font-weight: normal;
}

img {
  max-width: 100%;
}

#gallery {
  margin: 0;
  padding: 0;
  list-style: none;
}

#gallery li {
  float: left;
  width: 45%;
  margin: 2.5%;
  background: #ccc;
}

#gallery li a p {
  margin: 0;
  padding: 5%;
  font-size; 075em;
  color: #000;
}

5 Answers

I believe because of the cascading nature of CSS, you have h1 in two places and the h1 further down the page does not have color. I would take the h1 element away from h2, and leave h2 by itself as you have already have a color in place.

Jeff Lemay
Jeff Lemay
14,268 Points

The code submitted by OP is correct (regarding what you've mentioned). This is the benefit of cascading styles. If your h1 and h2 share a color but not a font-family/size/weight, this is how you would do it.

Jeff Lemay
Jeff Lemay
14,268 Points

In the last set of properties, you used a semi-colon after font-size instead of a colon.

#gallery li a p {
  margin: 0;
  padding: 5%;
  font-size: 075em; /* right here - I made the correction */
  color: #000;
}

EDIT: Just noticed that the value should probably be 0.75em and not 075 also.

Luis Francisco Nogueira Vieira de Vasconcelos
Luis Francisco Nogueira Vieira de Vasconcelos
9,975 Points

It's strange, I just copy+paste his code, check the work and it said that it's working fine.

Though, you got a point, there's those 2 things to fix.

thanks everyone. I didnt even see those two small details. The issue ended up being that it didnt want the text color to be black! crazy little program!