44

What is the best way to decrease the size of a font awesome icon. There is a fa-3x, etc... to increase the size. Is there a class to decrease the size?

Michael JDI
  • 1,241
  • 5
  • 18
  • 30

5 Answers5

64

Font-Awesome icons, as the name suggests, are font-based. This means to decrease their size all you have to do is decrease their font-size:

.fa {
    font-size: 12px;
}
James Donnelly
  • 126,410
  • 34
  • 208
  • 218
  • 2
    To add to his answer, almost everything you can do to a font you can do to the icons. Colors, sizes, spacing ect. ect. all get changed as if it were a font. Super simple! – Adam Buchanan Smith Aug 13 '15 at 21:22
35

There are two Font Awesome classes to use if you need something simple: fa-xs and fa-sm.

The size equivalents are:

  • fa-xs: .75em
  • fa-sm: .875em

Sizing Icons | Font Awesome (more information's here)

gef
  • 7,025
  • 4
  • 41
  • 48
Veronica B.
  • 351
  • 3
  • 3
11

Font-Awesome icon size modification:

  1. "font-size" property in "style" attribute:

     <i class="fas fa-search" style="font-size: 25px;"></i>
    
  2. "font-size" property in CSS stylesheet (like the accepted answer shows)

     .fa {
         font-size: 12px;
     }
    
  3. HTML tags

     <small>
         <i class="fas fa-search"></i>
     </small>
    
  4. Using Fontawesome classes so that the icons take a size relative to their parent elements:

     <i class="fas fa-search fa-sm"></i>
    
     <i class="fas fa-search fa-lg"></i>
    
Ralf
  • 16,086
  • 4
  • 44
  • 68
3

One way is your internal CSS class or use default Font Awesome class:

<i class="fas fa-camera fa-xs"></i>

<i class="fas fa-camera fa-sm"></i>

<i class="fas fa-camera fa-md"></i>

<i class="fas fa-camera fa-lg"></i>

<i class="fas fa-camera fa-2x"></i>

and keep going wit fa-4x and so one.

The Docs for smart use icons can be found here Font Awesome Docs Sizing and css you could use will find documented there as well.

Halee
  • 492
  • 9
  • 15
1

Font-Awesome icons, as the name suggests, are font-based. This means to decrease their size all you have to do is decrease their font-size:

::before {
    font-size: 130px;
}
Consule
  • 1,059
  • 12
  • 12