4

I'm using Bootstrap for a small element on my website. However, when I add the code,

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

It always messes up something on my website, in this case the header. Is there any way I can only make the bootstrap CSS apply in one section of the website? This is beyond annoying.

Turnip
  • 35,836
  • 15
  • 89
  • 111
OWENNNN
  • 59
  • 2
  • 5
  • I don't think you can use the CDN version for that. However, I believe you can build your own so that all styles apply only when contained within a, say, `section.mybootstrap`, for example. – Sinan Ünür May 19 '15 at 17:22
  • 1
    Can you show us some of your code, for example the "small element" and what you want to achieve? It seems a bit over the top to include a whole stylesheet just for one element, especially if the stylesheet isn't meant to included for this purpose. – malifa May 19 '15 at 17:23
  • 1
    I think this is what you are looking for https://formden.com/blog/isolate-bootstrap. – Bikash kharel May 05 '19 at 22:25

1 Answers1

2

Add some more code so that people here can suggest you. If you want to add a bootstrap only to small section of your site or page, you can just go on the console(F12), click the on the section where you want the bootstrap to be applied. Copy the same code of bootstrap but you have to change the class of it and apply in your code with the new class name.

Code Sniper
  • 77
  • 1
  • 9