hari haran hari haran - 3 months ago 48
CSS Question

Font Awesome not working In cakephp?

Below id my code. i have added font-awesome for cakephp. but in my output the fontawesome not appearing.

HTML

<i class="fa fa-institution"></i>


CSS

.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}

Answer

Where you're giving this. In html link or button.

  1. Check whether you properly included the font awesome or not

  2. If you're as link means $this->Html->link("<i class='fa fa-users'></i>", [action here], ['escape' => false])

And i'm using font awesome icons for my cakphp 3 project also. its working fine for me

Comments