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

(Any )About photo disappears when CSS .profile-photo code is entered. when taken off, photo returns.

Im working on building a website (html css) and on my "about" page, when i add the coding " /*************** PAGE: ABOUT ***************/

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

The picture completely disappears Is this a glitch, or am I doing something wrong? when i remove that bit of coding from css, the picture reappears. Ive tried substituting different pictures and the picture is still missing.

3 Answers

Mike Morales
Mike Morales
19,833 Points

I had that same problem in the beginning but I am not sure what I did to correct the problem. I did add the inline-block to the display, to see if that made any changes, and my picture did appear but for some reason it now works with just using block, instead. Also you might want to set your border-radius to 100% instead of 20%. Unless you prefer the radius of 20%. You could also apply your main.css code here at W3C CSS Validation Service to check for any possible errors.

thank you!