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 trialErrin E. Johnson
22,458 Points.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%; }
Thomas MacFarlane
2,430 PointsI 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
Errin E. Johnson
22,458 PointsThank 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
Jason Anello
Courses Plus Student 94,610 PointsErrin 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
Errin E. Johnson
22,458 PointsWorked great! Clearing the wrapper makes sense. and i was able to remove the clear: both: from .profile-photo
Errin E. Johnson
22,458 PointsErrin E. Johnson
22,458 PointsIts 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;