TExcelTAD
Home › Bootstrap › BS5 Grid Large & XL

Bootstrap 5 Grid: Large and Extra Large

The three biggest tiers target laptops and desktop monitors:

Tier Infix Starts at .container width Typical device
Large lg 992px 960px Small laptops, landscape tablets
Extra large xl 1200px 1140px Laptops and desktops
Extra extra large xxl 1400px 1320px Large monitors

The preview frame is usually narrower than 992px, so you'll see the smaller fallback in most examples here. To see the large layouts, maximise your browser window on a wide screen — or temporarily change lg to sm in an example to preview the same layout at a smaller width.

Large columns

html · try it yourself
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="py-2">
  <div class="container-fluid">
    <p class="small mb-2">Frame: <strong id="w"></strong>
      <span class="badge text-bg-secondary d-lg-none">below lg</span>
      <span class="badge text-bg-success d-none d-lg-inline">lg or wider</span>
    </p>
    <div class="row g-2">
      <div class="col-lg-3"><div class="p-2 bg-primary-subtle border border-primary rounded">col-lg-3</div></div>
      <div class="col-lg-6"><div class="p-2 bg-success-subtle border border-success rounded">col-lg-6</div></div>
      <div class="col-lg-3"><div class="p-2 bg-danger-subtle border border-danger rounded">col-lg-3</div></div>
    </div>
  </div>
  <script>document.getElementById('w').textContent = window.innerWidth + 'px';</script>
</body>
</html>

A three-tier layout: md, lg and xl

Real layouts often step through several tiers. This product grid shows 1 → 2 → 3 → 4 items per row as the screen grows, using row-cols-*:

html · try it yourself
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="py-2">
  <div class="container-fluid">
    <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-2">
      <div class="col"><div class="card card-body p-2">🎧 Headphones</div></div>
      <div class="col"><div class="card card-body p-2">⌚ Watch</div></div>
      <div class="col"><div class="card card-body p-2">📷 Camera</div></div>
      <div class="col"><div class="card card-body p-2">🎮 Controller</div></div>
      <div class="col"><div class="card card-body p-2">💻 Laptop</div></div>
      <div class="col"><div class="card card-body p-2">📱 Phone</div></div>
      <div class="col"><div class="card card-body p-2">🖨 Printer</div></div>
      <div class="col"><div class="card card-body p-2">🖱 Mouse</div></div>
    </div>
  </div>
</body>
</html>
Width Per row
< 768px 1
768–991px 2
992–1199px 3
≥ 1200px 4

A three-column page from lg

Wide screens can afford a left navigation, main content and a right info panel. Below lg, the panels stack, and the right panel can be hidden completely with d-none d-xl-block to show it only on really wide screens.

html · try it yourself
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="py-2">
  <div class="container-fluid">
    <div class="row g-2">
      <nav class="col-lg-2"><div class="bg-dark text-white rounded p-2 small h-100">☰ Nav</div></nav>
      <main class="col-lg-7 col-xl-7"><div class="border rounded p-2 small">Main content. Full width below lg, 7/12 from lg.</div></main>
      <aside class="col-lg-3 d-none d-lg-block"><div class="bg-body-tertiary rounded p-2 small h-100">ℹ️ Info panel (lg+ only)</div></aside>
    </div>
  </div>
</body>
</html>

xxl and wide containers

On very large monitors, lines of text that span the full width become hard to read. That's why .container stops at 1320px even at xxl. You can also use .col-xxl-* to make content narrower on huge screens:

html · try it yourself
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="py-2">
  <div class="container-fluid">
    <div class="row justify-content-center">
      <div class="col-lg-10 col-xl-8 col-xxl-6">
        <div class="border rounded p-3">
          <h6>Readable article</h6>
          <p class="small mb-0">This column is 100% wide on small screens, then 10/12 at lg, 8/12 at xl and 6/12 at xxl — so the text never gets uncomfortably long on big monitors.</p>
        </div>
      </div>
    </div>
  </div>
</body>
</html>

Tip: You don't need to use every tier. Most sites use two or three breakpoints. Only add an extra tier when the layout really looks wrong without it.

Test yourself

At which width does the xl tier start?

  1. 992px
  2. 1140px
  3. 1200px
  4. 1400px

With row-cols-1 row-cols-md-2 row-cols-lg-3, how many items per row at 1000px?

  1. 1
  2. 2
  3. 3
  4. 4

How do you show an aside only on screens 1200px and wider?

  1. .d-xl-block
  2. .d-none .d-xl-block
  3. .d-xl-none
  4. .visible-xl