I have taken over a project for someone. Thee former developer started using using Bootstrap to create a new menu. The problem is that bootstrap and at least one other CSS file in the project have classes with the same name. Because of this, bootstrap is causing the existing layout to not display properly. What are ways to deal with this type of situation? Bootstrap really just needs to be use with the web page header and nothing else. CSS is not one of my strong skill sets.
3 Answers
The problem is that bootstrap and at least one other CSS file in the project have classes with the same name.//
This is the right time to find those clashing classes and give custom names to the external css files. It is always recommended that we don't change the bootstrap classes by modifying the bootstrap css or give our classes the same name assigned by bootstrap. Not doing so might make your life harder as your project expands. So better safe than sorry.
1 Comment
You said that it's the header that relies on Bootstrap and nothing else, if that is the case and your Bootstrap verion is 3.0 and up, you can get just the navbar and related css from the GetBootstrap.com customizer

After you toggle on what you need, scroll down and remove other additions (just unclick or toggle them all off) then go down and download just the CSS you need for the menu the other developer used. If it's the .container class that's conflicting, you can re-name it in the compiled CSS that you just downloaded and then use that re-named class in your html.
You didn't mention what conflicted, ususally it's the .container class but also elements may be messed up by the global box-sizing:border box that Bootstrap uses. To fix that, don't remove it, it's best to use that and just re-set your elements to the correct widths and don't worry about padding or border. Read about it here: http://www.paulirish.com/2012/box-sizing-border-box-ftw/