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

When I set my profile-photo display to block on my about page the img disappears when

I am on the build a website track. When I set my profile-photo display to block on my about page the img disappears when I view the page. Does anyone know why this is?

5 Answers

Hi Sarah,

If you're on firefox then the problem is due to the image not clearing the floated header.

You can add clear: both; to your existing #wrapper rule to force the wrapper div to drop below the floated header.

#wrapper {
  clear: both;
}

could you show me your code please? use three backticks ``` followed by your code (refer to markdown cheatsheet)

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

its defintely the display that is causing a problem because if I add this code without it the img is there but is on the left of the page. I have also tried other display settings and adding any of those also makes the img disappear. Thanks

Try running it different web browsers and see how it works

Thats brilliant thankyou. Its working now :)

I had the exact same issue while using Firefox and it was driving me nuts. Thank you for the help!