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

glenn romaniuk
glenn romaniuk
32,520 Points

my li color are changing but the code reviewer is rejecting the answer

is there something wrong with my style?

Add a margin of 2.5% to the gallery list items. Then, set the text color and background to colors of your choosing. Bummer! Be sure to set the color for gallery list items to a color of your choosing.

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: white;

}

gallery li a p {

color: orange;

}

4 Answers

Christopher Warren
Christopher Warren
17,640 Points

BUG: Using hex codes for the colors prevents you from passing.

Stone Preston
Stone Preston
42,016 Points

looking at your gallery li here:

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

your forgot to change the text color using the color attribute:

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

the challenge wanted you to change the color at the #gallery li li level, not the #gallery li a p level.

Evan Agee
Evan Agee
13,088 Points

I was actually able to get it to work by using the shorter format for hex codes on the color attribute e.g.

color: #ccc; background-color: #eaeaea;

glenn romaniuk
glenn romaniuk
32,520 Points

your right now for the weird part i know for a fact i had the prop/value in the rule i copied it from my personal code editor i verified the style was being applied as when i looked at it in the preview screen it appeared i backed out of the code challenge and did it a 2nd time and it accepted it not sure if the code editor has a bud in it but i've had this happen to me before thx