1

I have tried every variation of this code from FontAwesome and cannot get the icons to display:

http://prntscr.com/7jmy3y

I use Visual Studio 2013 for Web.

@model HelloWorld.Models.Post
@{
    ViewBag.Title = "Delete";
}

<link rel="stylesheet" href="../../../Content/post.css">
<link rel="stylesheet" href="../../../Content/font-awesome.css">
<script src="../../../Content/js/jquery.js"></script>

<div class="create-post-form">
    <div class="form-group">
        <article class="post">
            <h4>@Html.DisplayFor(model => model.Title)</h4>
            <p>@Html.DisplayFor(model => model.Description)</p>
            <ul class="post-footer">
            <li><span id="comments"><i class="fa fa-comment"></i> 20</span></li>
            <li><span id="likes"><i class="fa fa-heart"></i> 5</span></li>
            </ul>
        </article>
</div>
</div>
magicandre1981
  • 27,895
  • 5
  • 86
  • 127
Geronimo
  • 149
  • 3
  • 12

2 Answers2

2

I think the problem is in the fonts. Refer this answer for an example. What have I done? This problem can be solve by using css file on remote server:

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
Community
  • 1
  • 1
Geronimo
  • 149
  • 3
  • 12
0

Sorry if this is late! :)

I experienced this problem, which I solved by adding manually through Visual Studio. Follow this process:

  • Inside Visual Studio, inside a solution: Right-click 'Add' > 'New folder'
  • Right click 'Add' > 'New Item', then select all the items.
  • Drag and drop the file where you want to use it.

This should then work!

Lee
  • 447
  • 6
  • 9