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 Framework Basics Build a Website with Bootstrap Building with Bootstrap

Kalum Sieber
Kalum Sieber
2,699 Points

bootstrap rounded corners

what bootstrap class gives an element rounded corners?

2 Answers

The .img-rounded class will give you rounded corners on an image. To add it to other elements I believe you'd have to add your own custom class. For example:

<p class="rounded">A rounded element</p>
.rounded {
  border-radius: 10px;
  background: #000; // without a background or border applied you won't be able to see if its rounded
}

Check out CSS Tricks - Border radius for a good explanation

Kalum Sieber
Kalum Sieber
2,699 Points

That worked. Thanks James!