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

Why can't I make my image a circle?

I'm using the snippet: <img class="mb-3 img-fluid rounded" src="img/pdx.jpg" alt="Portland">

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,863 Points

Hi Sarah,

The first thing would be... are you using Bootstrap 3 or 4. If you're using 4, then .img-fluid is correct. If you're using 3 then it needs to be .img-responsive.

Next, the .rounded class only rounds the corners. It does not make the image a circle. For that you need the class .rounded-circle.

Hope this solves it for you! :) :dizzy:

.rounded-circle worked, thanks!! I wan't able to find any information about this in the Bootstrap 4 documentation.

You need to add a class with border-radius style.