Bootstrap Border Related Classes

Notes:

Bootstrap – Border related classes:
border:
- sets (1 pixel solid light gray) border on all sides of an html element
border-top:
- sets (1 pixel solid light gray) only the top border to an html element
border-right:
- sets (1 pixel solid light gray) only the right border to an html element
border-bottom:
- sets (1 pixel solid light gray) only the bottom border to an html element
border-left:
- sets (1 pixel solid light gray) only the left border to an html element

Border removal related classes:
border-top-0:
- sets the top border to 0 pixels, i.e. it removes the top border of an html element
border-right-0:
- sets the right border to 0 pixels, i.e. it removes the right border of an html element
border-bottom-0:
- sets the bottom border to 0 pixels, i.e. it removes the bottom border of an html element
border-left-0:
- sets the left border to 0 pixels, i.e. it removes the left border of an html element
border-0:
- sets the border to 0 pixels, i.e. it removes the border from all sides of an html element

Border color related classes:
border-primary:
- sets the border color to blue color
border-secondary:
- sets the border color to mid gray color
border-success:
- sets the border color to green color
border-warning:
- sets the border color to yellow color
border-info:
- sets the border color to pale blue color
border-danger:
- sets the border color to red color
border-dark:
- sets the border color to dark gray color
border-light:
- sets the border color to light gray color

Example Code:

<div class="m-3 border">Some text</div>
<div class="m-3 border-top">Some text</div>
<div class="m-3 border-right">Some text</div>
<div class="m-3 border-bottom">Some text</div>
<div class="m-3 border-left">Some text</div>

<div class="m-3 border border-top-0">Some text</div>
<div class="m-3 border border-right-0">Some text</div>
<div class="m-3 border border-bottom-0">Some text</div>
<div class="m-3 border border-left-0">Some text</div>
<div class="m-3 border border-0">Some text</div>

<div class="m-3 border border-primary">Some text</div>
<div class="m-3 border border-secondary">Some text</div>
<div class="m-3 border border-success">Some text</div>
<div class="m-3 border border-warning">Some text</div>
<div class="m-3 border border-info">Some text</div>
<div class="m-3 border border-danger">Some text</div>
<div class="m-3 border border-dark">Some text</div>
<div class="m-3 border border-light">Some text</div>
<div class="m-3 border border-white">Some text</div>
<div class="m-3" style="border:1px solid red;">Some text</div>
<div class="m-3" style="border:1px dotted red;">Some text</div>

Interview Questions: