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 How to Make a Website Adding Pages to a Website Style New Pages

I'm going crazy trying to figure out why the profile-photo CSS is not being applied!

And I used the same CSS code to pass the code challenge! Anyone see what I'm missing? Thanks!

From about.html page:

<img src="img/nick.jpg" alt="Photograph of Nick Pettit" class="profile-photo">

From main.css:

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

5 Answers

If you are using firefox add just 1 more property to the .profile-photo

clear:both;

Thanks. I'm using Chrome. The was issue resolved when I logged back in the next day, so I thought it was just a matter of restarting Workspaces. A similar display issue happened in a later step, so I tried restarting Workspaces and Chrome. That didn't work but I decided to wait and see how it looked the next day. Again the display issue resolved on its own.

Maybe the cache is the problem.

My advice is to use refreshing pages (ctrl + f5). You will also delete cache on particular page.

Good point. I forget to try that option.

I think the answer turned out to be "try restarting Workspaces" because I haven't done anything and it is working now! Thanks anyway :)

Looks like your in an HTML sheet! wrap your CSS markup with the <style> tag

or add it to the external stylesheet

Sorry to confuse, I just pasted parts of the code from to different files.

Make sure you've closed your img element in the HTML.

<img src="img/nick.jpg" alt="Photograph of Nick Pettit" class="profile-photo" />

Hi Pamela, tried your method of restarting the workspaces in chrome and it works fine now!