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 trialKasthuri Gengadaren
623 PointsHi, does the pixel on a picture have to be an exact square when working on the .profile-photo (border-radius: 100%)?
I can't seem to make the picture a circle. My code is: .profile-photo { clear: both; display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }
3 Answers
idan ben yair
10,288 PointsHi Kasthuri,
Try to give the image that you are using the max-width attribute of 100% That will stretch the image all over your div.
Let me know if that worked for you :)
Jason Anello
Courses Plus Student 94,610 PointsHi Kasthuri,
The image does need to be a square if you want to get a circle. Otherwise it will be elliptical.
I would recommend that you crop your image to be a square.
Kasthuri Gengadaren
623 PointsHi Guys,
Thank you for your reply. Logged in today to start working on the codes and the image appeared round all of a sudden. I think there was a problem with saving the file, maybe it did not get reloaded with the changes. Now I am working on something else, and the whole page disappeared. Something is probably wrong with Treehouse server?
Regards, Kas