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 trialFenia Vasileiou
7,349 PointsBorder-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%;
}
5 Answers
Fenia Vasileiou
7,349 PointsThank you!! It is worked i forgot the "=" to my class. (Beginner's fault!)
Richard Duncan
5,568 PointsBorder 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.
harsha praneeth
5,449 Pointstry using -webkit so that it might work
Fenia Vasileiou
7,349 PointsThank 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
5,568 Pointsput your code in a http://jsbin.com bin and I'll take a look.
Cherie Burgett
8,711 PointsI would suggest checking your about.html file and be sure that your class= "profile-photo" has opening and closing quotes.
Dave McFarland
Treehouse TeacherDave McFarland
Treehouse TeacherHi 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.