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 trialMandy Hayes
2,328 PointsStyling Webpage & Navigation: Question 4 of 4
"Challenge task 4 of 4 Add a margin of 2.5% to the gallery list items. Then, set the text color and background to colors of your choosing."
My answer (sans the comment marks): <code>
gallery li {
float: left; width: 45%; margin: 2.5%; color: #000; background: #ccc; } </code>
It reminds me to set a color, but I have? Is there a glitch or am I overlooking something? Thank you!!!!
2 Answers
Damon Johnson
Courses Plus Student 2,775 PointsHey Mandy,
Try this:
.gallery li {
float: left;
width: 45%;
margin: 2.5%;
color: #000;
background-color: #ccc;
}
Hope this works for you.
Are you also assigning to #gallery or .gallery (Div or class?) You have just wrote gallery in your code,
=)
Mandy Hayes
2,328 PointsAnswered! Thank you!
Damon Johnson
Courses Plus Student 2,775 PointsNo worries,
Happy Coding =)