0

Following the suggestion in this SO post, I moved my css files into a subfolder named css as in the image below.

enter image description here

The project lost connection with the css files as I would expect, so I changed 7 references to /content/... in the image below to /content/css/.... 2 of the references related to images and did not need changing.

enter image description here

After I did that, the project's css connection worked fine, but I did not regain access to glyphicon glyphicon-cog in the following html helper:

@Html.ActionLink(" ", "Administration", "Home", routeValues:=New With {.area = ""}, htmlAttributes:=New With {.class = "glyphicon glyphicon-cog"})

I don't understand why the application can no longer see the glyphicon class that is supposedly included in the bootstrap.min.css file, according to the this SO post.

Is my problem that I shouldn't have changed all 7 references above, or is there some kind of hard coding in the bootstrap.min.css that is causing my problem?

Added per comment request:

Bootstrap v3.3.7

BundleConfig.vb is:

Public Module BundleConfig

    Public Sub RegisterBundles(ByVal bundles As BundleCollection)

        bundles.Add(New ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js"))

        bundles.Add(New ScriptBundle("~/bundles/jqueryval").Include(
                    "~/Scripts/jquery.validate*"))

        ' Use the development version of Modernizr to develop with and learn from. Then, when you're
        ' ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
        bundles.Add(New ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"))

        bundles.Add(New ScriptBundle("~/bundles/bootstrap").Include(
                  "~/Scripts/bootstrap.js"))

        bundles.Add(New StyleBundle("~/Content/css/css").Include(
                  "~/Content/css/bootstrap.css",
                  "~/Content/css/site.css",
                  "~/Content/css/print.css"))
    End Sub
End Module

Also in the _Layout file is: (The areas actually reference this file also)

@Styles.Render("~/Content/css/css")

Bootstrap assets (as I understand them):

enter image description here enter image description here enter image description here

Alan
  • 1,587
  • 3
  • 23
  • 43
  • Which version of Bootstrap are you using? In any case, any of the Bootstrap assets need to also move relative to the css file. Show your bundle config code and the folder structure for your the Bootstrap assets. – Jasen Apr 22 '19 at 22:05
  • I believe I provided all you need above, but let me know. – Alan Apr 22 '19 at 22:31
  • You'll need to move the fonts directory as well. See https://stackoverflow.com/a/24129696/2030565 for a working example. – Jasen Apr 23 '19 at 02:19
  • Moved fonts directory into Content which put it in the same relative path specified in the bootstrap files and that solved my problem. I should have been able to figure that out, but I missed seeing the hard coding in bootstrap that I had wondered about. Thx. – Alan Apr 23 '19 at 15:59

0 Answers0