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

Mustufa Hussain
Courses Plus Student 445 PointsCode Challenge 1/4
It asks: "Add CSS that will allow all images to fill their parent element. But it keeps telling me that "Bummer! It doesn't look like you set the maximum width on images yet. But the answer I put was: " img { max-width:100% } Please help.
6 Answers

Jonathan Grieve
Treehouse Moderator 91,254 PointsDo you need to set the selector for the parent element too?
Failing that, add your semi colon to your max width. img {max-width: 100%;}

Jonathan Grieve
Treehouse Moderator 91,254 PointsDo you need to set the selector for the parent element too?
Failing that, add your semi colon to your max width. img {max-width: 100%;}

Mustufa Hussain
Courses Plus Student 445 PointsThank you again for the help but the same error keeps popping up. I tried both of the methods and it is still not working. Is there any other method that you have that might make it work?

Jonathan Grieve
Treehouse Moderator 91,254 PointsWithout seeing all the code, my best guess is you need to look at your selector making sure it's correct.
#gallery {
margin: 0; padding: 0; list-style: none;}
}
Look make sure in your index.html tab in the challenge that you have an element with the id gallery.

Mustufa Hussain
Courses Plus Student 445 PointsThank you so much for the help. It worked this time and I appreciate you taking the time to answer my question.

Jonathan Grieve
Treehouse Moderator 91,254 PointsYou're welcome,, glad you sorted it!

ricardo arteaga
540 Pointsthanks jonathan passed it at last.
Mustufa Hussain
Courses Plus Student 445 PointsMustufa Hussain
Courses Plus Student 445 PointsThank you for the response and it worked. I have one more question, the next step asks me too, "Select the element with the ID gallery. Then, remove the margin, padding, and bullet points." The code that I wrote was,
id {
margin: 0; padding: 0; list-style: none;} But it tells me, "Bummer! It looks like at least one side has no margin. Be sure you set all sides to zero margin." Can you please help me again. I will highly appreciate it thanks.
Jonathan Grieve
Treehouse Moderator 91,254 PointsJonathan Grieve
Treehouse Moderator 91,254 PointsTry adding px to your padding value so it would be padding: 0px; and margin: 0 auto;
It could also be that it wants all specific sides of your margin so margin: 0 0 0 0;