fa-border
Published Aug 1, 2022Updated Oct 14, 2022
Contribute to Docs
The fa-border
class is used to place a border around an icon. For additional control there are CSS custom properties associated with the border that can be set:
--fa-border-color
: Sets the CSSborder-color
value.--fa-border-padding
: Sets the CSSpadding
value.--fa-border-radius
: Sets the CSSborder-radius
value.--fa-border-style
: Sets the CSSborder-style
value.--fa-border-width
: Sets the CSSborder-width
value.
Example
<i class="fas fa-chess-pawn fa-border"></i><iclass="fas fa-chess-pawn fa-border"style="--fa-border-radius: 100%;--fa-border-color: red;"></i><iclass="fas fa-chess-pawn fa-border"style="--fa-border-width: 3px; --fa-border-color: black; --fa-border-style: dotted;"></i>
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Open Source on Codecademy
- Career path
Front-End Engineer
Front-end engineers work closely with designers to make websites beautiful, functional, and fast.Includes 34 CoursesWith Professional CertificationBeginner Friendly115 hours - Free course
Learn CSS
In this CSS tutorial, you’ll learn how to add CSS to visually transform HTML into eye-catching sites.Beginner Friendly6 hours