Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.