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
Balazs Szilagyi
Courses Plus Student 5,945 PointsModify 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
Joshua Miller
7,824 Pointsmy guess is that it is firefox. I've seen at least five other people post about the same problem.
Navid Mirzaie Milani
6,274 PointsCan you please post your code? as well html as css thank you
Balazs Szilagyi
Courses Plus Student 5,945 Pointsyes 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%; }"
Navid Mirzaie Milani
6,274 Pointsyou have to do
```<img src="yourimage.jpg' class='profile-photo'>
Balazs Szilagyi
Courses Plus Student 5,945 PointsI have done it and still doesn't work unfortunately.
Joshua Miller
7,824 PointsI'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?
Balazs Szilagyi
Courses Plus Student 5,945 PointsIt can be the firefox, I am using that as well.
Joshua Miller
7,824 Pointsbefore 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
Balazs Szilagyi
Courses Plus Student 5,945 PointsGreat! thanks a lot, it worked for me as well! :)
Navid Mirzaie Milani
6,274 Pointsvery strange that clear left is able to show you the picture it must going wrong somewhere else..
Navid Mirzaie Milani
6,274 Pointsit 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;)