There are a few options...
First make sure you link to the bootstrap css before your own styles
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"/>
<link rel="stylesheet" href="mystyle.css"/>
CSS applies rules based on how important it reads the code. Including more specific selectors makes css more likely to apply the style. Applying style to an id
will apply over applying the style to just an a
element.
Using inheritance can also give a style more importance. If you have an li
class .nav-item
inside a nav
tag, using nav>.nav-item
will apply the style.
There is also an !important
flag in css, so you could use text-align: center !important
. This will override any styles. That being said, !important
is a poor development practice so I would not recommend using it, especially if there are multiple developers working on your project. See this answer