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

Max-width

the coding challenge asks me to set the image maximum width to 150 px. Here is what I have:

img {

display: block;

max-width: 150px;

margin: 0 auto 30px;

border-radius: 100%;

}

I can't find anything wrong with it, but it isn't working and I can't pass the code challenge. Is there something I'm missing?

Can you provide a link to the code challenge in question?

1 Answer

Matthew, the issue you are running into is you are selecting all images and not just the one with the profile-photo class. Try changing img to profile-photo and that should solve it.

Earlier in the track they might have mentioned global selectors vs class vs id. It's usually better to be specific when using selectors– just something to remember as you work on your projects.

It worked! Thank you very much. I feel a little dense now.

No worries, it happens to the best of us.