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

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

Step 5 doesn't work

This is my code:

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

I think that it's correct. But it doesn't let me pass.

Also I want to tell you that your page is not mobile friendly.

3 Answers

I get slightly different code to that but more to do with the margin:

img {
  display: block; 
  margin: 0 auto 30px 0;
  max-width: 150px;
  border-radius: 100%;
}
Sam Baines
Sam Baines
4,315 Points

Do you not need to actually set the class for the image in the css like below:

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

This code passes the challenge.

It didn't say to, but yes both seem to pass. And it would make more sense to manipulate the class too.

I tried it again with the class selector, and now it worked. Thanks a lot.