0

I have provided a template and it contains many CSS files in head and the body is divided into header ,content and footer portions. I want to add to add bootstrap in order to utilize its grid system for its content part. But when ever I add bootstrap.css in head above or below all the style sheets in <head> content part and footer part renders well but my header portion of the body encounter certain design problems as many of the properties in other css files get overridden by its grid system.

All I want to know is, is there any hack I may be able to use the bootstrap.css for the content part?

I have also tried linking the bootstrap file in <body> below the <header> and above the content portion(I know its not a good practice.) . but it also causes the similar problems for the header portion.

1

3 Answers 3

2

What you can do is make and download a custom bootstrap version from http://getbootstrap.com/customize/ that contains only the grid system and use that CSS in your web app.

Sign up to request clarification or add additional context in comments.

1 Comment

Absolutely ow some and perfect saved my day.
0

No, you can't. You're going to either have to change your markup and adjust the styles accordingly, or use an ID wrapper and change the styles in your CSS to only target <header> under that specific ID.

You're better off adjusting your styles to fit bootstrap, though.

Comments

0

Try adding !important to the properties that you want to customize in your CSS file.

But the best way I see to solve your issue is modifying the bootstrap.css file adding your configurations and adding !important if necessary

5 Comments

@n01ze why? He can just download the bootstrap.css file, edit it as he wants and import it, can't he?
But he has no better chance, has he?
Yup but there are a lot of css files near about 9-10 its hard to go through all of them and changing. :(
just add !important to your attributes and it'll override all the other assignations to it
lets find out which and all styles are over ridden and remove style from bootstrap.css. And its a bad practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.