Borders: Borders are generally used to display an outline around a box or table cell or any other HTML element. In Bootstrap, there are different classes available to add or remove borders. The classes that are used to add borders are referred as Additive classes and those that are used to remove borders are referred as subtractive classes.
Additive Border Classes:
- .border : This class adds a border all around the element.
- .border-top : This class adds a border on the top edge of the element.
- .border-left : This class adds a border on the left edge of the element.
- .border-right : This class adds a border on the right of the element.
- .border-bottom : This class adds a border on the bottom of the element.
Subtractive Border Classes:
- .border-0 : This class removes border from all around the element if exists.
- .border-top-0 : This class removes the border from the top edge of the element if exists.
- .border-left-0 : This class removes the border from the left edge of the element if exists.
- .border-right-0 : This class removes the border from the right of the element if exists.
- .border-bottom-0 : This class removes the border from the bottom of the element if exists.
Below program uses all of the additive and subtractive classes to add and remove borders:
Any colour can be added to the border by using the following border-color classes that are available in bootstrap. If you want any other cutomized color, then you can set it manually using the CSS attribute.
Radius of Borders: Border radius is used to make the corner of border curved. More the radius, more curved and round it will be.
In bootstrap, the following classes as used in the code are used to implement radius at particular corners.
- CSS | Borders
- Gradient borders
- Spacing in Bootstrap with Examples
- Bootstrap Buttons with Examples
- Containers in Bootstrap with examples
- Popovers in bootstrap with examples
- Display Property in Bootstrap with Examples
- Input Groups in Bootstrap with Examples
- Bootstrap | Sizing an element with Examples
- Colors and gradients in bootstrap with examples
- Vertical alignment in Bootstrap with Examples
- BootStrap | Positioning an element with Examples
- Bootstrap | Float utilities with Examples
- Bootstrap | figure class with Examples
- List group in bootstrap with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.