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

HTML How to Make a Website Adding Pages to a Website Make an About Page

Surendra Kulkarni
Surendra Kulkarni
6,826 Points

set max-width to 150px

I wrote the code below: but was marked wrong. So what is the correct answer? img{ display: block; margin: 0 auto; margin-bottom: 30px; max-width: 150px; border-radius: 100%; }

4 Answers

Shane Meikle
Shane Meikle
13,188 Points

Taking a look at that challenge, it appears you should be targeting a class and not the img tag itself.

.profile-photo {
CSS IN HERE
}

Try that. Also, for the margin, I would suggest:

margin: 0 auto 30px auto;

instead of having them separate.

Hi Surendra,

I don't think the question is worded very well. Here's what passed for me:

img.profile-photo {
    display: block;
  margin: 0 auto 30px;
  max-width: 150px;
    border-radius: 100%;
}