The fa-fw class is used to set an icon to a fixed width. This is useful when vertically aligning icons in a list.


<p>Using Fixed Width:</p>
<div><i class="fas fa-keyboard fa-fw"></i> Item 1</div>
<div><i class="fas fa-caret-right fa-fw"></i> Item 2</div>
<div><i class="fas fa-mobile-alt fa-fw"></i> Item 3</div>
<p>Without Fixed Width:</p>
<div><i class="fas fa-keyboard"></i> Item 1</div>
<div><i class="fas fa-caret-right"></i> Item 2</div>
<div><i class="fas fa-mobile-alt"></i> Item 3</div>

Font Awesome Fixed Width Examples


Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn Open Source on Codecademy