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 trialElias Harfouch
616 PointsCSS coding on Profile Photo not updating Image on Website Page
Hi, I am currently working through the Web Design Track and I inserted an image in my 'About' page on the developing website from files imported into the folder on my Workspace. The image has appeared in About page following the href src etc code in About.html code page.
However, I have entered the following CSS code [below] to change the shape and boundaries of the image and it is not reflecting/updating the image. The thing is that it worked temporarily and then reverted back to older image dimensions.
Any ideas what I might be doing wrong?
Any help you can provide would be most appreciated as I'm still very much a beginner.
Thanks so much.
Elias.
.profile-photo {
display: block;
max-width: 150px;
margin: 0 auto 30px;
border-radius: 100%;
}
5 Answers
Jonathan Arbely
6,691 PointsCan you try to change the image class name to "profilephoto" and its css to ".profilephoto". I think "-" is causing problems.
Tommy Gebru
30,164 PointsHey Elias, did you find everything ok?
Elias Harfouch
616 PointsHey Tommy,
I'm still experiencing difficulty with it - not sure if it is something on my computer but I'll post my html in reply to Wayne just in case I have made a mistake somewhere. It's a little frustrating.
Thanks very much for checking with me.
Wayne Priestley
19,579 PointsHi Elias,
Your css is fine, can you double check the path to your image is correct in your html, if your not sure you can post a your html here for us to take a look.
Elias Harfouch
616 PointsHi Wayne,
Thanks very much. I thought I might try to delete and re-type the path and although it was exactly the same - it seemed to work this time and link to the image….not sure why that happened, but thank you to you and all others who provided me with suggestions. Hopefully no more issues with this particular feature.
Elias.
Tommy Gebru
30,164 PointsWeird. Dont let unseen problems stop you, keep up the good work!
Also to close out a forum discussion, select Best Answer, this will help other students find similar solutions and keep the forum organized. Hope this helps.
Elias Harfouch
616 PointsElias Harfouch
616 PointsHi Jonathan,
Thank you for your suggestion. Unfortunately, it still didn't work following the removal of "-" from class name/and css. It's quite strange.