Bootstrap

Bootstrap Grid Large

Understanding Bootstrap Grid System for Large Devices (col-lg-*)


Introduction

Responsive design is essential in modern web development. Whether you’re building a landing page, dashboard, or blog, your layout must look great on all devices. That’s where Bootstrap’s grid system comes in.

In this article, we’ll focus on how to use Bootstrap’s large device grid system using the col-lg-* classes — ideal for desktops and widescreen laptops (≥992px).


Bootstrap Grid: Quick Recap

Bootstrap’s grid is based on a 12-column layout. You can control how many columns each element occupies at different screen sizes using classes like:

Breakpoint Prefix Min Width
Extra Small col- <576px
Small col-sm- ≥576px
Medium col-md- ≥768px
Large col-lg- ≥992px
Extra Large col-xl- ≥1200px

Example: Basic col-lg-* Layout

html
<div class="container">
<div class="row">
<div class="col-lg-6 bg-primary text-white p-3">Column A</div>
<div class="col-lg-6 bg-secondary text-white p-3">Column B</div>
</div>
</div>

✅ What Happens:

  • On large screens (≥992px): Two columns appear side-by-side, each taking up 6 out of 12 columns (50% width).

  • On smaller screens (<992px): The columns stack vertically.


3-Column Grid Example (for Large Devices)

html
<div class="container">
<div class="row">
<div class="col-lg-4 bg-success text-white p-3">1/3 Column</div>
<div class="col-lg-4 bg-warning text-dark p-3">1/3 Column</div>
<div class="col-lg-4 bg-info text-white p-3">1/3 Column</div>
</div>
</div>

Each column takes 4 out of 12 units. This layout shows 3 equal columns side-by-side on desktops but stacks them on tablets and phones.


Why Use col-lg-*?

  • Best for desktop-first layouts.

  • Gives you more control at wider resolutions.

  • Ensures optimal spacing, alignment, and content hierarchy on larger screens.


Real Use Case: Cards in Grid on Large Screens

html
<div class="container">
<div class="row">
<div class="col-lg-3 mb-4">
<div class="card">
<div class="card-body">Card 1</div>
</div>
</div>
<div class="col-lg-3 mb-4">
<div class="card">
<div class="card-body">Card 2</div>
</div>
</div>
<div class="col-lg-3 mb-4">
<div class="card">
<div class="card-body">Card 3</div>
</div>
</div>
<div class="col-lg-3 mb-4">
<div class="card">
<div class="card-body">Card 4</div>
</div>
</div>
</div>
</div>

This layout shows 4 cards in one row on desktops and stacks them as the screen size decreases.


Combine with Other Breakpoints

You can use multiple breakpoints for fine control:

html
<div class="col-12 col-sm-6 col-lg-4">
<!-- This column spans:
- Full width on extra-small
- Half width on small
- One-third width on large screens -->

</div>

Conclusion

The col-lg-* classes in Bootstrap are essential when you want full control over your layout on large screens. By using these classes wisely, you can create polished, desktop-optimized designs without writing a single media query.

Build smart, responsive, and professional web layouts with Bootstrap’s grid — and your users will thank you for it.

Leave a Reply

Your email address will not be published. Required fields are marked *