Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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