I am trying to use a font-awsome icon within a button. The icon works fine in firefox but when I use it in chrome it appears as a square. I have looked around and the only thing that I found was that the paths to the fonts may not be right however I have since tried the cdn version here and it is still working in firefox but not in chrome.
Also I have tried the same stylesheets in a static html file on my computer it is working fine.
Here is an example of the html being used:
<a id="btnLogin" href="url.com" class="btn btn-primary btn-large disabled">
<i class="icon-refresh icon-white"></i>
Sign in using Facebook
</a>
And also the web app is built with rails and is using bootstrap for the templates.
Any ideas as to what could be causing this?
Quoted from their website: The fa prefix has been deprecated in version 5. The new default is the fas solid style and the fab style for brands. This is why my fonts were showing blank squares.
To increase icon sizes relative to their container, use the fa-lg (33% increase), fa-2x , fa-3x , fa-4x , or fa-5x classes. If your icons are getting chopped off on top and bottom, make sure you have sufficient line-height.
I had the same issue. But I fixed it easly.
In Font Awesome fonts files must be placed in "fonts" directory instead of "font" directory in previous versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With