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 trialsean purdy
2,770 Pointshow to make images circle using css
Hey so i am trying to figure out with my not very knowlegable css knowledge how to turn a rectangular image circle using css. My current image is 200px width and height.
I have tried using various code from the web that they said will change the page to circular but it either makes the image disappear or it stays square.
I am just messing around with different coding and this was something that popped up and i wanted to know as i will want my image on my about page to be circular
Konrad Pilch
2,435 PointsWhat about HTML, could you show us that please?
2 Answers
Konrad Pilch
2,435 Points.img-circle img{ border-radius: 50%; }
or
img.img-circle{ border-radius: 50%; }
You need to select the img tag.
sean purdy
2,770 PointsHy thanks my html was wrong...Where i reference to the css folder i put href="responsive.css" instead of href="css/responsive.css" this sorted it out once i changed it around. Need to carefully look at my coding first
sean purdy
2,770 Pointssean purdy
2,770 Pointsi tried the class="img-circle" in html and then
.img-circle { border-radius: 50%; }
that didn't work