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

Jennifer Kauffman
Jennifer Kauffman
1,533 Points

It keeps saying you need a color?

I dont know what Im doing wrong but It keeps saying "be sure to set the color for gallery list items to a color of your choosing. I ALREADY DID THAT!!! please help.

Here is the code.

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

#gallery li  {
  float: left;
  width: 45%;
  margin: 2.5%; 
  background-color: #f5f5f5;
  color: #000
}

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

```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: #f5f5f5;
  color: #000
}

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

2 Answers

Hi Jennifer,

I think you may have found a bug in the challenge. Your answer of

img {
  max-width: 100%;
}

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

#gallery li  {
  float: left;
  width: 45%;
  margin: 2.5%; 
  background-color: #f5f5f5;
  color: #000;
}

should work. Although you may have missed off the semicolon at the end of that color line.

For some reason the challenge doesn't like you using

color: #000;

I found that changing it to any other valid colour code worked. So just try picking a different colour and see if that passes.

Jennifer Kauffman
Jennifer Kauffman
1,533 Points

Thanks for the help! it worked and now I can move on :) I was very frustrated to say the least.

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Just in case you are wondering, it didn't pass with #000 because text, by default, is already black. So, when you put in #000 and the checker ran the code, it saw black text and figured that nothing was changed and threw the Bummer!

Challenges can be really picky sometimes.

Keep Coding! :)

I'd wondered if #000 was a little too default, but I was just thinking that it does say pick a colour of my choosing and I'm picking black damn it :-)

Jennifer Kauffman
Jennifer Kauffman
1,533 Points

haha Thanks yall....maybe black isnt a color in their defenition...idk lol