Wednesday 22 February 2017

AssetTracking 3 .aspcore navbar




//~/AssetTracking/wwwroot/css/site.css

/*navbar background color*/ 
.navbar-custom {
    background-color:#229922;
    color:#ffffff;
    border-radius:0;
}

/*navbar menu text color*/
.navbar-custom .navbar-nav > li > a {
    color:#ffff00;
}

/*navbar menu button color when mouse hover on it*/
.navbar-custom .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
    background-color: #ffff00;
    color: #ff3300;
}

/*navbar logo text color*/
.navbar-custom .navbar-brand {
    color:#ffff00;
}

-------------------------------------------------------------------

//~/AssetTracking/Views/Shared/_laout.cshtml

<div class="navbar navbar-custom 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="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>

                <a asp-area="" asp-controller="Asset" asp-action="Index"><img src="~/images/logo.png" /></a>
             
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a asp-area="" asp-controller="Asset" asp-action="Index">Display Asset</a></li>
                    <li><a asp-area="" asp-controller="Asset" asp-action="Assign">Assign Asset</a></li>
                    <li><a asp-area="" asp-controller="Home" asp-action="Contact">Contact</a></li>
                </ul>
                @*@await Html.PartialAsync("_LoginPartial")*@
            </div>
        </div>
    </div>

reference:
http://www.tutorialsteacher.com/mvc/layout-view-in-asp.net-mvc
http://stackoverflow.com/questions/18529274/change-navbar-color-in-twitter-bootstrap-3
http://stackoverflow.com/questions/16625972/change-color-of-bootstrap-navbar-on-hover-link

No comments:

Post a Comment