0

I am new to using Bootstrap Version 3 an I am trying to change the default navbar color of the Bootstrap Yeti theme, http://bootswatch.com/yeti/, for my ASP web application in VS 2013. I downloaded the bootstrap.css and bootstrap.min.css files and copied them to my project.

I want to change the navbar background color to green: 93c951 and the navbar text to blue: 0f74bc.

I have followed the instructions here Change navbar color in Twitter Bootstrap 3 for the correct answer but the navbar color remains the same when I change the .navbar-default colour settings among other navbar setting changes. I make the changes to the bootstrap.css file under the Content folder that was made when I created my Visual Studio Web Forms application.

What do I need to do to make these changes?

Site.Master

<!DOCTYPE html>

<html lang="en">
<head runat="server">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title><%: Page.Title %> - Ecoline</title>

    <asp:PlaceHolder runat="server">
        <%: Scripts.Render("~/bundles/modernizr") %>
    </asp:PlaceHolder>

    <webopt:BundleReference runat="server" Path="~/Content/css" />
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />

</head>
Community
  • 1
  • 1
Kinyanjui Kamau
  • 1,890
  • 10
  • 55
  • 95

1 Answers1

0

Hmmm, it might be that the original bootstrap styles are overwriting your custom styles. Try replacing/deleting the styles you downloaded from Bootstrap – or use !important, if you must.

.navbar-default {
    background-color: #93c951 !important;
    border-color: #222222;
}


.navbar-default .navbar-nav > li > a {
    color: blue;
}


// Also don't forget to change the hover styles as well

.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
    color: blue;
    background-color: #93c951 !important;
}   


// And the brand colour

.navbar-default .navbar-brand {
    color: blue;
}   
Richard Oliver Bray
  • 1,043
  • 13
  • 20