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

HTML How to Make a Website Adding Pages to a Website Style New Pages

.profile_photo declaration does not work with display block. img disappears. Firefox bug, see fix! Teachers notes:

/if i set to display to auto the img will display but not centered, browser firefox/

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

Its a browser compatibility issue, Firefox will not accept the display: block; or the margin: 0 auto; Chrome will accept the display: block; margin: 0 auto 35px;

I believe you'll find the bug is already reported in the lesson notes where the .profile_photo declaration is made. The fix is to include a clear:both property in the declaration

Thank You Thomas..I need to make a point to read the notes regularly. Clear fix for Firefox. will fix this bug.

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

1 Answer

Errin E. Johnson , that fix was specific to that problem.

I recommend that you clear the floated header in the wrapper element. This will save you from having other problems.

Add to your existing wrapper rule:

#wrapper {
clear: both;

Then this profile photo problem would have never happened. You can remove the clear: both from .profile-photo

Worked great! Clearing the wrapper makes sense. and i was able to remove the clear: both: from .profile-photo