Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS How to Make a Website Styling Web Pages and Navigation Make a CSS Image Gallery

In my CSS quiz, being asked to set text & bckgrd color of my list items to color of my choosing. Not working.

...I've tried hex codes for color instead of the words themselves eg. black, white, etc.

What seems to work in Workspace for me doesn't seem to work for this quiz. I'm not sure if i'm doing something wrong or not.

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

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

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

h1, h2 {
  color: #fff;
}

nav a {
  color: #fff;
}

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-color: gray;
  color: black;
}

3 Answers

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi there,

HTML text color is black by default. So if you set color to black or #000, the code challenge doesn't recognize a change in color. Use a different color and you should be all set. :)

Thank you kind sir! Got it sorted.

Jeff Lemay
Jeff Lemay
14,266 Points

This is strange. Your code is correct. I played around with things and was able to pass with this code:

#gallery li {
  float: left;
  width: 45%;
  margin: 2.5%;
  color: #fff;
  background: black;
}

It doesn't seem to be allowing the text color to be black. I tried the hex code for black as well and that doesn't work.

Nigel,

Try again with white or some other color. Jeff has confirmed white works.

Thanks man, got it!

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,624 Points

Hey Guys, For most of the challenges, it will not pass you if you set text color to black. This has something to do with how the code-checker verifies what you've done is correct. Text, by default, is black... so when your code is checked, the code-checker sees black text and thinks nothing was set/changed.

Hope that helps you out.

Keep Coding! :)

Makes sense! Thanks for the help! :)