6

I have the following Problem. When i try to add a new Theme to ASP.Net MVC 5 my Navbar get crashed. When i use the Standard Bootstrap it works. I have no idea why it dont work.

This is my BundleConfig:

bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap-lumen.css",
                  "~/Content/site.css"));

This is the Standard MVC _Layout.cshtml Page:

<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            @Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li>@Html.ActionLink("Home", "Index", "Home")</li>
                <li>@Html.ActionLink("About", "About", "Home")</li>
                <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
            </ul>
            @Html.Partial("_LoginPartial")
        </div>
    </div>
</div>

This is the result when i use the normal Bootstrap:

Correct Navbar

This is the result when i try to run with Lumen Theme

enter image description here

Can someone help me? In other projects it works all the time correct i have no idea whats going wrong.

2 Answers 2

5

This is because Lumen uses Bootstrap 4. Your issue with the navigation is a known breaking change.

Your options are to either use a Bootstrap 3 theme or perform a migration to version 4.

Sign up to request clarification or add additional context in comments.

Comments

3

You can download version 3 by changing version number in the URL:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.