Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Adding Pages to a Website Style New Pages

Abdülhak Gözegir
Abdülhak Gözegir
4,689 Points

Firefox doesn't show the image after set as "display: block;"

Firefox doesn't show the image after set as "display: block;" but internet explorer does.

4 Answers

I had this issue just yesterday. I found that the image was actually applied off screen. Look to the bottom of your browser, you may find that there is a horizontal scroll bar. Scroll right and you will likely see that your image has been pasted to the right of your header. The header takes up 100% of the screen and the profile pic is pasted at 101%. If you re-size the window. The profile picture still stays outside of the view window. The bottom scroll bar is the only way to see it.

To fix this I added: clear: both; to .profile-photo{}.

End result:

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

I just found a note below the video.

"Correction for Firefox

There's a bug in the CSS for this video that causes the profile picture to display incorrectly in Firefox. In order to correct the issue, the clear property with the value both needs to be applied to the .profile-photo class. "

Now was that something we missed all along or is it a recent add?

I don´t know. Maybe we just haven´t seen it!

Now I just feel silly.

Sam May
Sam May
8,363 Points

can you paste an example of your code, or put it in Codepen so we can see?

Abdülhak Gözegir
Abdülhak Gözegir
4,689 Points

here is http://codepen.io/anon/pen/vmKbF

I cannot access to my workspace so some part of images are missing.

Actually <img src="img/nick.jpg" alt="Photograph of Nick Pettit" class="profile-photo"> this cannot be displayed on Firefox

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

it is default settings that Nick Pettit wrote.