Sizing Utilities with Bootstrap
📖 Scenario: You are building a simple webpage with boxes that have different widths and heights. You want to use Bootstrap's sizing utilities to control the size of these boxes easily.
🎯 Goal: Create three colored boxes using Bootstrap classes. Each box should have a specific width and height using Bootstrap's width utilities and inline styles.
📋 What You'll Learn
Use Bootstrap 5 sizing utility classes for width and inline styles for height
Create three
div elements with background colors: red, green, and blueSet the first box to width 25% and height 100px
Set the second box to width 50% and height 150px
Set the third box to width 75% and height 200px
Use semantic HTML and ensure the boxes are visible on the page
💡 Why This Matters
🌍 Real World
Sizing utilities help quickly control the size of elements on a webpage without writing custom CSS. This is useful for building responsive layouts and consistent designs.
💼 Career
Front-end developers often use Bootstrap or similar frameworks to speed up styling tasks. Knowing sizing utilities helps create flexible and accessible UI components efficiently.
Progress0 / 4 steps