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 trialMir K
2,388 PointsDisplay: block?
Once I set my profile picture to display: block; it goes next the header part of the page and I have to scroll over to see it. This is fixed when I take away this setting. I'm not sure what I'm doing wrong. Everything else looks the same.
3 Answers
Andrew Stelmach
12,583 PointsA block element fills the entire width of its parent, so the reason I can think of for that happening is that it (or its parent) is floated.
EDIT: or one of its parents has been set to display: inline; or display: inline-block;
Mir K
2,388 PointsThank you, this fixed it
Kevin Sackeli
4,723 PointsI had the same problem. I added clear: both and it worked. Thanks for the help
Tracy Trathen
10,468 PointsTracy Trathen
10,468 PointsYep. I was having the same problem, until I added "clear: both;" as the first declaration in the .profile-photo class rule. Once I added that, it showed up with no problem.