Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to offset a column by 3 in Bootstrap.
Bootsrap
<div class="row"> <div class="col-md-6 [1]"> Content here </div> </div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'col-offset-3' which is not a valid Bootstrap class.
Placing the number before the breakpoint like 'offset-3-md'.
Missing the dash between 'offset' and the breakpoint.
✗ Incorrect
In Bootstrap, to offset a column by 3 on medium devices, use the class 'offset-md-3'.
2fill in blank
mediumComplete the code to offset a column by 2 on small devices.
Bootsrap
<div class="row"> <div class="col-sm-4 [1]"> Small device offset </div> </div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'offset-md-2' which applies to medium devices, not small.
Using 'offset-xs-2' which is not a valid Bootstrap 5 breakpoint.
Confusing the breakpoint order.
✗ Incorrect
To offset a column by 2 on small devices, use 'offset-sm-2'.
3fill in blank
hardFix the error in the offset class for a large device column.
Bootsrap
<div class="row"> <div class="col-lg-5 [1]"> Large device offset </div> </div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Removing the dash between breakpoint and number.
Using underscores instead of dashes.
Adding extra dashes.
✗ Incorrect
The correct offset class uses a single dash between 'lg' and the number: 'offset-lg-5'.
4fill in blank
hardFill both blanks to offset a column by 4 on extra small devices and set its width to 6.
Bootsrap
<div class="row"> <div class="col-[1] [2]"> Extra small device offset </div> </div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up offset and width numbers.
Using breakpoint abbreviations for extra small devices which are not needed.
Using 'offset-6' instead of 'offset-4'.
✗ Incorrect
For extra small devices, use 'col-6' for width and 'offset-4' to offset by 4 columns.
5fill in blank
hardFill all three blanks to create a column that is 3 wide, offset by 2 on medium devices, and offset by 1 on large devices.
Bootsrap
<div class="row"> <div class="col-md-[1] [2] [3]"> Responsive offsets </div> </div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'col-md-2' instead of 'col-md-3' for width.
Mixing up medium and large offset classes.
Forgetting to include all offset classes.
✗ Incorrect
Use 'col-md-3' for width, 'offset-md-2' to offset by 2 on medium, and 'offset-lg-1' to offset by 1 on large devices.