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 trialMartina Vonkomerova
7,790 PointsWhy cant I center Profile Image in my about page? (Mozilla)
I added the following code in main.css file: .profile-photo { clear: both; display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; } And my html is looking like this: <section> <img src="imgs/BrunoES.jpg" alt="Photograph of Bruno Santos" class="profile-photo"> <h3>About</h3> <p> Introdution about my self. Mention github </p> </section>
Finally, my image size is : 200px X 200px
5 Answers
julianderson Kaminski
632 Points'''css .profile-photo { clear: both; display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }'''
Richard Nicholls
1,301 PointsLooks like an error in your text, you have typed imgs/ instead of img/ might be that.
Tim Knight
28,888 PointsMartina,
From what I can tell your profile image is centering with the example code that you provided.
James Cram
429 PointsHaving the same problem in mozilla. I am guessing it has to do with the browser.
Tim Knight
28,888 PointsWhat version of Firefox are you able to repeat this on James?
James Cram
429 PointsIt's the newest version of firefox. I found the answer in another comment on the video. There is a bug in firefox and you need to add a "clear: both; " to the .profile-photo css .
Eric Ash
8,122 Pointsdoes anyone know why we need to add clear:both. just curious to the reason behind it