ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to use font awesome icons in Awe().Button() ?
Title:
B
I
{code}
?
Finally upgraded to 5.5 and instead of building strings for ClientFormat buttons I'm using Awe().Button(). But how do I get fa fa-info-circle to display inside the button? Started with .CssClass("fa fa-info-circle") but that becomes class="awe-btn fa fa-info-circle" on the browser, which does not display the icon.
Save Changes
Cancel
Stephan Luis
asked at 07 Nov 2018
Answers
B
I
{code}
?
according to font awesome website you need to put the icon inside an `<i>` tag as the content of the button something like this: <a class="btn" href="#"><i class="icon-repeat"></i> Reload</a> so using our Button html helper, you can set the content this way: @(Html.Awe().Button().Text("<i class=\"icon-repeat\"></i> Reload"))
Save Changes
Cancel
Omu
answered at 07 Nov 2018
Thanks, that did it ... ( btw, you have two closing </a> above).
at 07 Nov 2018
Stephan Luis
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK