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

James Eaves
James Eaves
1,376 Points

Set img max-width

The challenge asks to set the max-width of an image to 150px and its border-radius to 100%. I wrote the following CSS code and receive a message that it's not correct. Could someone please help me figure out what I'm doing wrong? Thanks, James

 img { 
  max-width: 150px;
  border-radius: 100%;
}

1 Answer

daviem
daviem
21,118 Points

Hi James,

At the start of the challenge look out for the img{} rule that's already in the style sheet and then keep adding to it at each new challenge question till ending up with the below, and the challenge should pass ok

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

I think you might have been adding a new img{} rule which the test wouldn't be expecting you to do perhaps..

hope this helps.

all the best

James Eaves
James Eaves
1,376 Points

Thank you very much, David! James