diannevolek's picture

I am told that Basis theme loads Bootstrap 4. However I'm not getting bootstrap classes to display. My objective is to display a teaser as a pre-set Bootstrap card. I used field-groups to create divs with the correct Bootstrap classes, but none appear to load. If there something I need to do first? Have I misunderstood?

I placed the following code in the body of a page to test (after changing it to accept raw HTML). There is no theming at all - not even a button.

<div class="card" style="width: 18rem;">
  <img class="card-img-top" src="..." alt="Card image cap">
  <div class="card-body">
    <h5 class="card-title">Card title</h5>
    <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
    <a href="#" class="btn btn-primary">Go somewhere</a>
  </div>
</div>

Accepted answer

Backdrop loads the Bootstrap layout classes only--containers, rows and columns--used by the Layout module. So that doesn't include any card classes. If you want to use the full Bootstrap experience there are contributed modules that provide that.

Comments

Backdrop loads the Bootstrap layout classes only--containers, rows and columns--used by the Layout module. So that doesn't include any card classes. If you want to use the full Bootstrap experience there are contributed modules that provide that.

Thank you - that makes sense!