0

I want to customize bootstrap using new colors for navs and such. How would I create a separate css file that overrides some of the things on bootstrap.css? (I don't want to mess with the bootstrap css files, incase there are updates to bootstrap, and I don't have to re-add anything).

How do I change the color of the navbar in my custom CSS file?

madth3
  • 7,275
  • 12
  • 50
  • 74

2 Answers2

2

You can add the custom stylesheet after include bootstrap:

<link href="bootstrap.css" rel="stylesheet" type="text/css" />
<link href="mySpecial.css" rel="stylesheet" type="text/css" />

Then, you override the styles you want. So will be something like:

.btn-success {
  color: orange;
}

for an ugly orange text green button.

Agustin Meriles
  • 4,866
  • 3
  • 29
  • 44
0

Just create a new stylesheet, link to that below the bootstrap stylesheet then you can use the same CSS rules and your new stylesheet will over-ride bootstrap because it is linked to afterwards.

CaribouCode
  • 13,998
  • 28
  • 102
  • 174