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 trialPamela Browne
7,332 PointsI'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
Pavle Lucic
10,801 PointsIf you are using firefox add just 1 more property to the .profile-photo
clear:both;
Pamela Browne
7,332 PointsI think the answer turned out to be "try restarting Workspaces" because I haven't done anything and it is working now! Thanks anyway :)
Alexander Costa
11,464 PointsLooks like your in an HTML sheet! wrap your CSS markup with the <style> tag
or add it to the external stylesheet
Pamela Browne
7,332 PointsSorry to confuse, I just pasted parts of the code from to different files.
David Perkins
9,607 PointsMake sure you've closed your img element in the HTML.
<img src="img/nick.jpg" alt="Photograph of Nick Pettit" class="profile-photo" />
Bryce Chua
5,429 PointsHi Pamela, tried your method of restarting the workspaces in chrome and it works fine now!
Pamela Browne
7,332 PointsPamela Browne
7,332 PointsThanks. 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.
Pavle Lucic
10,801 PointsPavle Lucic
10,801 PointsMaybe the cache is the problem.
My advice is to use refreshing pages (ctrl + f5). You will also delete cache on particular page.
Pamela Browne
7,332 PointsPamela Browne
7,332 PointsGood point. I forget to try that option.