Practice and reinforce the concepts from Lesson 10
.container vs .container-fluid)Time estimate: 5 minutes
stackblitz-starters-dm1mranu⚠️ Important: Before You Start DO NOT DELETE the existing files in the template:
- Package files
- Any other files you didn't create
ONLY EDIT the necessary files.
In this activity, you will learn and practice Bootstrap's powerful grid system through hands-on challenges. You'll understand how to create responsive layouts using containers, rows, and columns that adapt to different screen sizes.
Total time estimate: 45-60 minutes
Time estimate: 5 minutes
index.html page in a new window<head> section)💡 Tip Always preview your work in a new window to properly test responsive behavior. Use the browser's developer tools to simulate different device sizes!
Time estimate: 10 minutes
Study these key concepts:
.container = fixed-width with responsive breakpoints.container-fluid = full-width at all screen sizes.row creates horizontal groups of columns.col-* defines column width and responsiveness💡 Tip: Remember the 12-Column Rule Bootstrap's grid system is based on a 12-column layout. Your columns in each row should add up to 12!
Time estimate: 10 minutes
.container class.container-fluid class💡 Tip Use your browser's developer tools (F12) to see exact pixel widths at different screen sizes.
Time estimate: 10 minutes
Practice using responsive grid classes:
.col- -> Extra small screens (``phones < 576``px).col-sm- -> Small screens (``tablets >= 576``px).col-md- -> Medium screens (``desktops >= 768``px).col-lg- -> Large screens (>= 992px).col-xl- -> Extra large screens (>= 1200px)💡 Tip: Mobile-First Approach Start with mobile classes (
.col-) and add larger breakpoints as needed. This ensures your layout works on all devices!
Time estimate: 15 minutes
Build these layout patterns:
.col for automatic sizing.col-6, .col-4, .col-3.col-12 .col-md-6 .col-lg-4💡 Tip: Common Layout Patterns
- Header:
.col-12- Sidebar + Content:
.col-md-3+.col-md-9- Three equal columns:
.col-md-4(x3)- Four cards:
.col-6 .col-lg-3(x4)
Time estimate: 10 minutes
Time estimate: 5 minutes
videoYour Bootstrap Grid project must include:
.container and .container-fluid examples.row wrapper around your columns.container not .contianer)ℹ️ Info Project Submission When you have completed your "Bootstrap Grid" project, submit it using the link below:
Before submitting: