Using bootstrap only in a special div

I use bootstrap in my TYPO3 interface plugin, but I want to use it only in a special div so that the class without_bootstrapwill not be affected from bootstrap classes.

for instance

<div class="without_bootstrap">
     <div class="with_bootstrap">
     </div>
</div>

Is it possible?

+4
source share
1 answer

Partially. If you avoid the class names that are used at boot time, you should be fine. But bootstrap defines some tag-specific styles, such as

a {
  background-color: transparent
}

You can get around this by specifying a style like this:

.without-bootstrap > a {
  /* whatever */
}

Example:

.wrapper {
  background-color:#f00;
}
.no-bootstrap > a {
  background-color:#fff;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="wrapper">
  <div class="no-bootstrap">
    <a href="#"> No Bootstrap</a>
    <div class="bootstrap">
      <a href="#"> With Bootstrap</a>
    </div>
  </div>
</div>
Run codeHide result

: http://getbootstrap.com/customize/

+2

All Articles