Bootstrap Grid – Medium Devices

Bootstrap Grid – Medium Devices

Bootstrap offers responsive grid classes to control how layout behaves on different screen sizes. For medium devices, such as tablets and small laptops, you use the class prefix:

col-md-*

➡️ This applies to screens ≥ 768px wide.

If the screen width is below 768px, columns will automatically stack vertically unless another smaller breakpoint class is used.


📌 Example: Equal Columns on Medium Devices



 

Behavior:

📱 Phones < 768px →

Column 1
Column 2
Column 3

💻 Medium screens ≥768px →

| Col 1 | Col 2 | Col 3 |

📌 Two Column Layout



 

✔ Creates a 50/50 layout on medium screens and above.


📌 Mixed Width Example



 


📌 Responsive Example (XS → SM → MD)



 

✔ Adjusts automatically at every breakpoint.


📌 Summary Table

Breakpoint ClassScreen WidthBehavior
.col-md-*≥ 768pxColumns display horizontally
Smaller Devices< 768pxColumns become full-width stacked

🎯 When to Use col-md-*?

Use medium classes when:

✔ Layout should change starting from tablets
✔ You want different layout behavior between mobile and larger screens
✔ You need a clean responsive design without extra media queries

You may also like...