dokgu
dokgu

Reputation: 6080

Bootstrap 5.2 grid is taking whole width

I'm trying to implement this grid wrapping from Bootstrap 5.2 documentation.

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>

<div class="grid text-center">
  <div class="g-col-4">.g-col-4</div>
  <div class="g-col-4">.g-col-4</div>
  <div class="g-col-4">.g-col-4</div>
</div>

My expectations were that there would be three columns that are equally sized but as you see here, each .g-col-4 spans the whole width instead of a third of it. What am I doing wrong here?

Upvotes: 1

Views: 295

Answers (1)

isherwood
isherwood

Reputation: 61124

Grid is opt-in. You need to enable the CSS Grid by setting $enable-cssgrid: true.

Upvotes: 1

Related Questions