fa-border

BrandonDusch's avatar
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:

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • In this CSS tutorial, you’ll learn how to add CSS to visually transform HTML into eye-catching sites.
    • Beginner Friendly.
      6 hours

Example

<i class="fas fa-chess-pawn fa-border"></i>
<i
class="fas fa-chess-pawn fa-border"
style="--fa-border-radius: 100%;--fa-border-color: red;"
></i>
<i
class="fas fa-chess-pawn fa-border"
style="--fa-border-width: 3px; --fa-border-color: black; --fa-border-style: dotted;"
></i>

Font Awesome Border Examples

All contributors

Contribute to Docs

Learn Open Source on Codecademy

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • In this CSS tutorial, you’ll learn how to add CSS to visually transform HTML into eye-catching sites.
    • Beginner Friendly.
      6 hours