Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

I don't see what I've done wrong...

It's telling me that I need to set the max-width to 150px...

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

It looks right to me - but it's not letting me go to the next stage.

Dave McFarland
Dave McFarland
Treehouse Teacher

To put code into a forum post use triple back ticks -- ``` — around the code. I fixed your code here, but in the future here's a forum discussion that describes how to add HTML, CSS, JavaScript or other code to the forum: https://teamtreehouse.com/forum/posting-code-to-the-forum

5 Answers

Hi Dulce,

You are pretty close, but here is how I completed the task with a couple of notes.

If you set img{} in your CSS to the requirement you would change all the images in the html file that your CSS is linked to to your profile-photo settings. That is why you should use a class attribute setting such as this.

.profile-photo {

}

Next: I don't believe your margins are quite right. I believe the requirement was to center the photo and leave 30px at the bottom. I would have used something like this:

margin: auto auto 30px auto

Finally the last two requirements was to add the max-width and border radius. I would have followed the code i wrote previously with these two requirements.

So your completed code should look like this:

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

Hope this helps

Gary

Dulcie,

Notice you want to use the class, not the img element.

.profile-photo{
  max-width: 150px;
  border-radius: 100%;
  display: block;
  margin: auto;
  margin-bottom: 30px;
}
Robert Ho
PLUS
Robert Ho
Courses Plus Student 11,383 Points

Hey Dulcie,

Everything looks right except your margin. It looks like you are trying to center that image by doing

margin: 0 auto 30px;

But there shouldn't be 30px property in there. So it should look like this:

margin: 0 auto;

As for the 30px, I think it has to do with setting the margin-bottom property to 30px. So that should be on its own line:

 margin-bottom: 30px;

Hope that helps!

Robyn Goodwin
PLUS
Robyn Goodwin
Courses Plus Student 10,009 Points

Your selector isn't correct. I'm thinking this is the profile photo picture is it not?

Thanks everyone :)