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 Build the Contact Page

Brendan Craft
Brendan Craft
1,741 Points

Workspace Profile Photo question main.css. My photo is not visible when the line display: block; is entered.

If I comment the line out then I can see the photo, only it isn't centred

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

Ikenna Okafor
Ikenna Okafor
1,408 Points

Hey there, seems like you missed the closing curly brace.

Brendan Craft
Brendan Craft
1,741 Points

Hi Ikenna - I checked my code and the curly brace is actually there, I just missed copying it into the text above. Unfortuantely I still have the same problem.

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

Thankyou

2 Answers

S TANDOH
S TANDOH
19,718 Points

because the header is floated left, it is affecting the display: block property of the image where as shifting it away from the screen.... to fix this just clear the image from any floats... by adding this ( clear: both; ) to the .profile-photo css.

Brendan Craft
Brendan Craft
1,741 Points

Thankyou Josephine and Samuel. Samuel, i will try this as soon as I can. Thankyou

check to see if your browser supports border radius.