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 trialMaximilian Stöhr
7,479 PointsCode Challenge Error
The Error is: Did you set the max width to 150px? In my code, i have "img { max-width: 150px; } What's my fault?
4 Answers
Damon Johnson
Courses Plus Student 2,775 PointsHey again,
I have just re-done the quiz, and here is my code, which was successful:
img { max-width: 150px; display: block; margin: 0 auto; margin-bottom: 30px; border-radius: 100%; }
Hope this helps, and it would be nice if you could update me as to what went wrong?
Cheers =)
Damon Johnson
Courses Plus Student 2,775 PointsHey Maximilian,
Can you post your whole code? Sometimes the quiz only wants what it asks for, so if you have added anything to the max-width property, it may overlook your 'correct code'.
Maximilian Stöhr
7,479 Pointsimg { display: block; margin: 0 0 30px 0; border-radius: 100%; } img { max-width: 150px; }
That's all I've added in the challenge, and the img in the html-file ofc... 4 out of 5 steps were successfulll.. Thank you for the answer btw :)
Damon Johnson
Courses Plus Student 2,775 PointsAhhh I see what went wrong.
You have targeted the same element twice, its best practice to tackle the stylings using as least code as possible (as we're lazy =P}
Maximilian Stöhr
7,479 PointsMaximilian Stöhr
7,479 PointsThank you a lot man, my fault was maybe to put it at the top of the css file.. I'm just too lazy to scroll :O