12

(sorry bad english..) is it possible to use the bootstrap grid in only one area (center div), not the whole site. The rest of the page should not be styled by bootstraps css rules. Thx

Jack Bonneman
  • 1,821
  • 18
  • 24
paul
  • 123
  • 1
  • 4
  • 1
    Bootstrap is CSS. I'm not sure what you're trying to accomplish but if you like something specific from Bootstrap just look through the source code and emulate that in your CSS. – elrick Nov 07 '13 at 12:57

3 Answers3

14

You can put all bootstrap css in .scss file and wrap all rules inside your own class which you can apply later on containers where you want bootstrap rules to be applied.

.enable-bootstrap {
   /* all bootstrap rules goes here */
}

After compiling this .scss file you will get all bootstrap rules starts with .enable-bootstrap so they will be applied only for content inside container with class enable-bootstrap

Vladimirs
  • 8,232
  • 4
  • 43
  • 79
7

It is possible, just implement the styling and script necessary for bootstrap to work. Then start with this markup where you want to use the bootstrap grid:

<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <!-- content in a 12 column div -->
        </div>
    </div>
</div>
Mr Lister
  • 45,515
  • 15
  • 108
  • 150
centurion
  • 91
  • 6
1

You can use this:

.enable-bootstrap {
(and write your styling here) }
Shikhar
  • 971
  • 1
  • 8
  • 18