Complete the code to create a Bootstrap container for the masonry grid.
<div class="[1]"> <!-- Masonry grid content here --> </div>
row instead of container for the main wrapper.col which is for columns, not the container.The container class creates a responsive fixed-width container in Bootstrap, which is the base for the masonry grid layout.
Complete the code to create a Bootstrap row that will hold the masonry columns.
<div class="container"> <div class="[1]"> <!-- Columns go here --> </div> </div>
container again inside the container.grid which is not a Bootstrap class.The row class in Bootstrap is used to create a horizontal group of columns inside a container.
Fix the error in the column class to make it responsive and suitable for masonry layout.
<div class="container"> <div class="row"> <div class="col-[1]"> <!-- Item 1 --> </div> </div> </div>
col-12 which makes the column full width.col-3 which creates 4 columns per row.The class col-4 creates a column that takes 4 parts of the 12-grid system, allowing 3 columns per row, which is common for masonry layouts.
Fill both blanks to add Bootstrap classes for spacing and enable masonry layout.
<div class="container"> <div class="row [1]" style="column-count: [2]; column-gap: 1rem;"> <!-- Masonry items --> </div> </div>
g-0 which removes spacing.The class g-3 adds gutters (spacing) between columns. The style column-count: 3; sets the number of columns for the masonry effect.
Fill all three blanks to complete the masonry item with responsive column classes and margin.
<div class="container"> <div class="row g-3" style="column-count: 3; column-gap: 1rem;"> <div class="col-[1] col-md-[2] [3]"> <div class="card"> <div class="card-body"> Masonry item content </div> </div> </div> </div> </div>
mt-3 instead of mb-3 which adds margin on top.col-12 makes the item full width on small screens, col-md-6 makes it half width on medium screens, and mb-3 adds margin below the item for spacing.
