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 trialBrian Fuller
6,699 PointsThe code checker is complaining that I didn't set the color of the list items in my gallery.
Here's my code:
'''css
gallery li {
float: left; width: 45%; margin: 2.5%; background-color: #fff; color: #000; } '''
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: #fff;
color: #000;
}
2 Answers
Brian Hankins
5,735 PointsYou will have to change the color value to a different color.
Currently the browser has already set the font to #000; (black). If you change the color slightly (#111); It will work.
For example:
#gallery li {
float: left;
width: 45%;
margin: 2.5%;
background-color: #fff;
color: #111;
sizwengubane
15,244 PointsThis is the correct answer for your question.. <blockquotes>
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%;
color: #369;
background-color: #FF0000;
}
</blockquotes> Mark my answer as the best if i managed to help you thanks
Brian Fuller
6,699 PointsBrian Fuller
6,699 PointsYup; I'm too boring I guess. It needed to see that the color had been changed.