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

Modify picture in css

I ran into a little problem, after I uploaded a picture in html (<img src="img/profil.jpg" alt="Photograph of Balazs Szilagyi" class="profile-photo">) the file name is matching and the picture was OK as well, but when I wanted to modify in css and used ".profile-photo { display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }" The picture has disappeared from my page. By any chance that you see the problem what I can not see? Thank for your answer in advance. Balazs

7 Answers

my guess is that it is firefox. I've seen at least five other people post about the same problem.

Can you please post your code? as well html as css thank you

yes html: img src="img/profil.jpg" alt="Photograph of Balazs Szilagyi" class="profile-photo" css: ".profile-photo { display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }"

you have to do

```<img src="yourimage.jpg' class='profile-photo'>

I have done it and still doesn't work unfortunately.

I'm having the same issue. I think it is also causing a problem later one when you need to split the page into two columns when you make to resolution bigger. Everything else has worked. The only issues i'm having are with my picture and the about page. could it be firefox?

It can be the firefox, I am using that as well.

before dipslay: block; put

clear: left;

I found this answer in another thread. It got my picture to show up, but i think it causes issues later on when trying to make the page responsive. I also couldn't get an explination as to why that worked and what its actually doing

Great! thanks a lot, it worked for me as well! :)

very strange that clear left is able to show you the picture it must going wrong somewhere else..

it depends how the structure of the html is but im very curious how this solution makes the problem fixed, but glad it is fixed thats sometimes more important;)