Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Adding Pages to a Website Style New Pages

Calling a class withing the HTML

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

I followed the lesson and typed the code exactly how the instructor did. However, when i refresh the page nothing changes. I had this problem earlier when i called a class, nothing changed in that instance either.

2 Answers

Adam Arvidsson
Adam Arvidsson
7,318 Points

Hi Nic. You are sure that you don't have a typo in the class name (HTML file)?

  <img src="img/NAME.jpg" alt="Name" class="profile-photo">

Don't forget to save.

Samuel Glister
Samuel Glister
12,471 Points

Hi Nicholas,

Have you checked your html to make sure you have assigned that class to the image.

Your html shout look like this

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