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 trial1 Answer
Lorenzo Pieri
19,772 PointsHi
#gallery { /*TASK 2*/
list-style: none; /*No iist bullets*/
padding: 0;
margin: 0;
}
#gallery li { /*TASK 3 + TASK 4*/
float: left;
width: 45%;
margin: 2.5%;
color: lightblue;
background-color: darkblue;
}
#gallery li img { /*TASK 1*/
max-width: 100%; /*Filling the parent*/
}
Check this code out. It worked for me so it will also work for you :)
Have the best day!
Jason Anello
Courses Plus Student 94,610 PointsHi Lorenzo,
Task 1 is asking for css that will allow all images to fill their parent. Not just ones inside #gallery
img {
max-width: 100%;
}
Lorenzo Pieri
19,772 PointsWell, you are right without a doubt. We should tell this to the team at Treehouse because the solution I posted here does work on the challenge!
Nice catch bro!
Matt Harris
2,762 PointsMatt Harris
2,762 Pointswhat is the problem?