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

HTML How to Make a Website Adding Pages to a Website Add Iconography

Elias Harfouch
Elias Harfouch
616 Points

CSS 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
Jonathan Arbely
6,691 Points

Can you try to change the image class name to "profilephoto" and its css to ".profilephoto". I think "-" is causing problems.

Elias Harfouch
Elias Harfouch
616 Points

Hi 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.

Tommy Gebru
Tommy Gebru
30,164 Points

Hey Elias, did you find everything ok?

Elias Harfouch
Elias Harfouch
616 Points

Hey 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
Wayne Priestley
19,579 Points

Hi 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
Elias Harfouch
616 Points

Hi 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
Tommy Gebru
30,164 Points

Weird. 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.