Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I decrease the size of a font-awesome icon?

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?

like image 361
Michael JDI Avatar asked Aug 13 '15 15:08

Michael JDI


People also ask

Can I modify font-awesome icons?

Select the SVG of font-awesome located in your extracted zip inside fonts. Repeat the procces uploading your own svg files. Inside Home (at the header of the page) Select the icons you want to download, customize them to give your custom names and select publish to have a link or download the fonts and css.

How do I reduce icon size in CSS?

To use an icon, just add the name of the icon to the class of an HTML <i> element. To control the size of the icon, change the font-size property of the icon, or use the w3-size classes: w3-tiny. w3-small.

How do I make font-awesome icons the same size?

Setting a Consistent Icon Width Font Awesome icons are designed on grid and share a consistent height. But they vary in width depending on how wide or narrow each symbol is. If you prefer to work with icons that have a consistent width, adding fa-fw will render each icon using the same width.


2 Answers

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;
}
like image 137
James Donnelly Avatar answered Oct 21 '22 22:10

James Donnelly


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 informations here)

like image 33
Veronica B. Avatar answered Oct 21 '22 20:10

Veronica B.