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 How to Make a Website Adding Pages to a Website Style New Pages

Picture disappears when set to "display:block"

Has anyone else run into the picture of Nick disappearing when setting the display to the block property? The margin, max-width, and border-radius property don't seem to make the picture disappear, it's just when I set the display to block, it suddenly disappears, and I have no idea why...

3 Answers

It works for me.

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

It's interesting, it works in Chrome, but not in Firefox. Will keep looking into it.

Another forum thread has the solution. See Jason's answer here: https://teamtreehouse.com/forum/problem-centering-display-inlineblock

i'm monitor-lizard.jpg this thread

Hi Justin. Yep, it appears to be a browser issue. The CSS code works in chrome but it does not work in Firefox or Internet Explorer.

Hopefully, someone will figure out the answer and post it in this thread.