I'm using the basic bootstrap css with nothing altered, and I have the following html in a Razor View in ASP.NET MVC:

<nav 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">
                @if (ViewBag.WidgetPages != null)
                {
                    foreach (WidgetPage page in ViewBag.WidgetPages)
                    {                            
                        <li class="navbar-collapse"><div>
                            <a href="@Url.Action("Index", "WidgetPage")" class="navbar-link">@page.Title  </a>
                            <a href="@Url.Action("Edit", "WidgetPage", new { id = page.Id })" class="navbar-link"><span class="glyphicon glyphicon-pencil" role="button"></span></a>
                            <a href="@Url.Action("Delete", "WidgetPage", new { id = page.Id })" class="navbar-link"><span class="glyphicon glyphicon-remove" role="button"></span></a>
                            </div>
                        </li>
                    }
                }
                <li><a href="@Url.Action("Create", "WidgetPage")">
                        <span class="glyphicon glyphicon-plus"></span>
                    </a>
                </li>
            </ul>
            @Html.Partial("_LoginPartial")
        </div>
    </div>
</nav>

All my navigation links are working just as they should - however, the alignment of the navigation bar is off from what I expect and want. What I'm ending up with is http://puu.sh/kN0NJ/ea996c060b.png, and what I'm hoping to get is simply all of the items aligned on the same line.

Related posts

Recent Viewed