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

CSS: display: block; will not show image

Hi

For some reason I can't get an image to display when I include the following css:

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

If I delete the 'display: block;' property, the image shows. Any thoughts?

3 Answers

Hi Michael,

This seems to be a browser issue (Firefox) and has popped up before on the forums.

There's a couple of posts here which explains it along with the "fix" in more detail...

https://teamtreehouse.com/forum/display-block-makes-my-image-of-nick-disappear

https://teamtreehouse.com/forum/problem-centering-display-inlineblock

Hope that helps

Paul

Paul, thanks. I guess life would be far too boring if we didn't have to mess about with incompatible browsers!!!

Absolutely, keeps us on our toes! :)