Bootstrap glyphicon not showing in Form

后端 未结 1 1441
孤街浪徒
孤街浪徒 2020-11-30 15:30

I\'m trying out different ways to do a form with a confirm. I have the following in form as well as just a hyperlink. The hyperlink below is displaying the glyphicon correct

相关标签:
1条回答
  • 2020-11-30 16:09

    Using Firebug or another debugger, find the css file in which the glyphicon is defined. In this css file check the src location at @font-face section. You might need to make some changes (i.e. adding or removing ' ../ ') in the src section according to your glyphicons location in your project as shown below:

    src: url('../fonts/glyphicons-halflings-regular.eot');
    

    or

    src: url('../../fonts/glyphicons-halflings-regular.eot');
    


    On the other hand, if some of the application files are not displayed after publishing it to the server, you might need to apply the following changes regarding to file path:

    from

    ~/../../Content/images/img.png
    

    to

    ./../../Content/images/img.png
    

    And under Properties window of the related files, check if the properties set for them as shown below:

    Build Action : Content
    Copy to Output Directory: Do not copy

    Hope this helps...

    0 讨论(0)
提交回复
热议问题