I have an MVC project that I have changed the default Bootstrap theme to Bootswatch - Cosmos, however it is giving me the attached result for the Navbar.
Initially I was running Bootstrap 3.0 and was using Bootswatch 3.0 to make sure there was no version conflict.
I have taken the following steps:
- Add cosmos-boostrap.css and cosmos-boostrap.min.css to the content folder
References the css file in my BundleConfig.cs:
bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", "~/Content/cosmos-bootstrap.css", "~/Content/site.css"));
Check my _Layout.cshtml for Styles reference:
@Styles.Render("~/Content/css")
Upgraded Bootstrap to v4 and tried Cosmos v4, but still got the same result.
It appears just to be an issue with the Navbar, because the other Cosmos fonts and buttons seem to be displaying OK. I have also tested some other Bootstrap themes, with the same outcome for the Navbar.
Any help would be appreciated.
EDIT: HTML for Navbar as below:
<body>
<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("Portal", "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>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year - TEST IT SOLUTIONS</p>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)