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 trialKatie Steiner
4,500 PointsStyle New Pages Video - CSS Not Working
I have my HTML and CSS files exactly like Nick does in the video. But for some reason, the CSS for the class profile-photo is not working in my file. My About page does not change at all. Anyone else having this problem? How do I fix it? Thanks!
Katie Steiner
4,500 PointsBelow is the HTML:
<img src="img/profile pic.jpg" alt="Photo of Katie" class"profile-photo">
And the CSS:
.profile-photo {
display: block;
max-width: 150px;
margin: 0 auto 30px;
border-radius: 100%;
}
3 Answers
Stone Preston
42,016 Pointshere is your issue:
<img src="img/profile pic.jpg" alt="Photo of Katie" class"profile-photo">
you are missing an = sign after the word class
.
try:
<img src="img/profile pic.jpg" alt="Photo of Katie" class="profile-photo">
Katie Steiner
4,500 PointsAh, thanks! It works now
Stone Preston
42,016 Pointsglad I could help : )
Agto Nugroho
3,245 PointsHi guys, I do this : '''html
<img src="img/agto.jpg" alt="Photo of Agto" class="profile-photo">
''' my image doesnt appear.
but when I do this :
'''html
<img src="img/agto.jpg" alt="Photo of Agto" class="profile-photo">
<img src="img/agto.jpg" alt="Photo of Agto" class="profile-photo">
'''
my image appear ( only one ) like example.
How do I fix it? :D
Thanks!
Stone Preston
42,016 PointsStone Preston
42,016 Pointscould you post your relevant html and css for your profile photo please? see the markdown cheatsheet which is linked in the bottom right corner of the comment text box or see this forum post for in depth instructions on code formatting in the forum