How to Add Borders using Bootstrap

You can quickly style the border and border-radius of an element. It can be used for images, buttons, or any other element.

1. Adding Borders

Use border utilities to add or remove an element's borders.

<span class="border"></span>
<span class="border-top"></span>
<span class="border-end"></span>
<span class="border-bottom"></span>
<span class="border-start"></span>

2. Adding Borders using Reverse (Subtractive)

<span class="border-0"></span>
<span class="border-top-0"></span>
<span class="border-end-0"></span>
<span class="border-bottom-0"></span>
<span class="border-start-0"></span>

3. Border Color

You can change the border color using any of the contextual colors. For example,

<span class="border border-info"></span>

4. Border Width

<span class="border border-1"></span>
<span class="border border-2"></span>
<span class="border border-3"></span>
<span class="border border-4"></span>
<span class="border border-5"></span>

5. Border Radius

You can add classes to an element to easily round its corners. For example,

<img src="/..." alt="..." class="rounded">
<img src="/..." alt="..." class="rounded-top">
<img src="/..." alt="..." class="rounded-end">
<img src="/..." alt="..." class="rounded-bottom">
<img src="/..." alt="..." class="rounded-start">
<img src="/..." alt="..." class="rounded-circle">
<img src="/..." alt="..." class="rounded-pill">
<img src="/..." alt="..." class="rounded-0">

6. Rounded Size

You can use the scaling classes for larger or smaller rounded corners. Sizes range from 0 to 3. 

For example,

<img src="/..." class="rounded-0" alt="...">
<img src="/..." class="rounded-1" alt="...">
<img src="/..." class="rounded-2" alt="...">
<img src="/..." class="rounded-3" alt="...">

 

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive