sploiber
sploiber

Reputation: 621

Change background color in navbar fixed menu bar Bootstrap

I'd like to change the color of my navbar fixed menu bar in Bootstrap. In application.css.scss I have this:

.navbar
  .navbar-inner {
    background-color: #2c2c2c;
  }
}

In application.html.erb I have this:

<header class="navbar navbar-inverse navbar-fixed-top">
<nav class="navbar-inner">

Could someone explain why I'm still seeing black as the menu bar background (I suspect I am not matching the classes quite right).

Upvotes: 3

Views: 54827

Answers (2)

Utam Sharma
Utam Sharma

Reputation: 77

<style type="text/css">
    .navbar {
        background-color:#00FFCC;
        background-image: none;
    }
</style>

just use this code you have some logical errors in your css

Upvotes: 2

Ben Rowe
Ben Rowe

Reputation: 28711

By default, the nav bar uses a css gradient. This uses the background-image property. You will need to reset this value as well:

.navbar {
  .navbar-inner {
    background-color: #2c2c2c;
    background-image: none;
  }
}

Update: Added missing brace.

Upvotes: 7

Related Questions