An error occured while " />

An error occured while " />

An error occured while "/>

bootstrap and fontawesome icons not displaying on a page

444 views Asked by At

In my view I have this code:

@if (!string.IsNullOrEmpty(Model.ErorMessage))
            {
                <div class="form-group">
                    <h4 class="text-danger">An error occured while attempting to update this record</h4>
                    <i class="pull-left fa-exclamation-triangle fa-lg"></i>
                    <p class="text-danger">@Html.DisplayTextFor(model => model.ErorMessage)</p>
                </div>
            }

The icon won't display. I get some weird square. I've tried it with bootstrap glyphicons and fontawesome, but neither will work yet I have a left hand menu that uses fontawesome and the icons show correctly. Am I missing something here?

1

There are 1 answers

3
Max On

One class is missing in your code. Please try:
<i class="fa fa-exclamation-triangle fa-lg"></i>

The class fa also needs to be mentioned in the i attribute.