0

I have included bootstrap css in my page demo.php using:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">  

and js file:

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

I have used this to include a progress bar plugin. Also I included a file (filename1.php). But when I use bootstrap it affects my included files (filename1.php) style, that I don't want to happen. Can somebody help me to find a solution for this? Thanks in advance.

Adrian
  • 100
  • 2
  • 15
  • Put the bootstrap styles before your styles and then yours (may) take precedence. But you also need to consider specificity. See here for more info: https://stackoverflow.com/a/25105841/2181514 – freedomn-m Jun 28 '17 at 08:13
  • Possible duplicate of [What is the order of precedence for CSS?](https://stackoverflow.com/questions/25105736/what-is-the-order-of-precedence-for-css) – freedomn-m Jun 28 '17 at 08:14
  • @freedomn-m I have put the bootstrap file before my style in demo.php ,so it not affecting my custom styles. But I dont know how to avoid it affecting the included file ('filename1.php'). – Adrian Jun 28 '17 at 08:23
  • Can't you put it before the included file? Is in the included file before the `` of your output? You might be misunderstanding what an 'included file' is - it's not a separate, isolated piece of functionality, it's just a way to organise the content - the *final* html is still a single serial html file (with your page inserted at the appropriate location). – freedomn-m Jun 28 '17 at 08:28

0 Answers0