I can’t center a navbar in Bootstrap 3 because I don’t know how to edit CSS in Bootstrap. I downloaded Bootstrap locally, so I don’t know if I need to edit the CSS file that is in the css folder of Bootstrap or if I should create my own CSS file. There is also more than one CSS file in the bootstrap folder. Which one do I need to edit?
I tried to edit the style directly in the Bootstrap html file, but nothing hapepnd on the website.
2
Answers
You can simply do it by adding flex properties to the parent of the navlinks so your code will look like:
As I understand, you are using a precompiled version. The latest available version for Bootstrap 3 is 3.3.7.
You should link this CSS file dist/css/bootstrap.min.css in your HTML.
You should not edit it!
All custom changes must go in your own CSS file. You should link it in your HTML after linking to Bootstrap. This is very important. Otherwise, changes will not be applied.
If you don’t see your changes, there can be a few reasons.
More info about CSS you can find there (MDN docs)
Also, it will be good to read bootstrap docs