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 trial

CSS How to Make a Website Adding Pages to a Website Style New Pages

Fenia Vasileiou
Fenia Vasileiou
7,349 Points

Border-radius is not working

I have a problem with border-radius property is not applied to the img any help? Browser: Google Chrome

.profile-photo {
  clear: both;
  display: block;
  max-width: 150px;
  margin: 0 auto 30px; 
  border-radius: 100%;
}
Dave McFarland
Dave McFarland
Treehouse Teacher

Hi Fenia Vasileiou There's a special way to format HTML and CSS for the forum. I've fixed your code in this post, but in the future you can use the methods described on this page https://teamtreehouse.com/forum/posting-code-to-the-forum for posting code to the forum.

5 Answers

Fenia Vasileiou
Fenia Vasileiou
7,349 Points

Thank you!! It is worked i forgot the "=" to my class. (Beginner's fault!)

Richard Duncan
Richard Duncan
5,568 Points

Border radius doesn't work in some browsers when applied directly to the img tag. Best to either wrap the img tag in a container element which has the border radius set or else set a background image for an element and add the radius to that.

Here are some examples

try using -webkit so that it might work

Fenia Vasileiou
Fenia Vasileiou
7,349 Points

Thank you for your answers, i used -webkit but it has not worked.Then i wrap the img in a container element and just centered the img but the border radius property has not worked.

Richard Duncan
Richard Duncan
5,568 Points

put your code in a http://jsbin.com bin and I'll take a look.

Cherie Burgett
Cherie Burgett
8,711 Points

I would suggest checking your about.html file and be sure that your class= "profile-photo" has opening and closing quotes.