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 trialAlison Hjul
2,355 PointsCan't center photo on About page
I've entered the code as instructed under the Page: About comment (ie, display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 20px) but the photo won't center - it stays aligned left. Any idea where I could be going wrong? The border-radius code works fine.
2 Answers
Jeff Busch
19,287 PointsHi Allison,
Would like to see your actual code because mine works.
Jeff
Alison Hjul
2,355 PointsHi Jeff, Thanks for getting back to me. My CSS code for the photo is:
.profile-photo { display: block; margin: 0 auto 30px; max-width: 150px; border-radius: 20px; }
I use Safari browser (v 5.1.10) on a Mac. I've since tried this out in Google Chrome and it centers OK, so it seems to be a browser issue. But it would be good to get this working in Safari too: I'll check if there's a newer version available.