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 trialPM Kacprowski
5,348 Pointsmax width
Hi,
I am going through exercise for Style New Pages. I receive an error, could you let me know where I am doing mistake?
Challenge Task 5 of 5: Give the image a maximum width of 150 pixels and a border radius of 100%.
The error I get: Bummer: Did you set the max width to 150px?
My solution: img{ display:block; margin:0 auto 30px; max-width: 150px; border-radius:100%; }
1 Answer
Dylan Glover
2,537 PointsHey PM,
I think your issue may be you are applying the stylings to the <img>
tag instead of the .profile-photo
class
I tried the challenge with the same styling you used but applied it to the class instead and it seemed to work.
.profile-photo {
display: block;
margin: 0 auto 30px auto;
max-width: 150px;
border-radius: 100%;
}
Hope this helps! Dylan
PM Kacprowski
5,348 PointsPM Kacprowski
5,348 PointsThank you for your help. This worked fine :)