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!

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 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">