Complete the code to create a Bootstrap container that centers content horizontally.
<div class="container [1]"> <p>Centered content</p> </div>
text-left or text-right which align text to sides.The text-center class centers text horizontally inside the container.
Complete the code to create a Bootstrap row with two equal columns.
<div class="row"> <div class="col-[1]">Column 1</div> <div class="col-[1]">Column 2</div> </div>
col-4 or col-3 which do not split evenly into two columns.Bootstrap grid has 12 columns total. Using col-6 divides the row into two equal halves.
Fix the error in the code to make the Bootstrap grid responsive with one column on small screens and two columns on medium screens.
<div class="row"> <div class="col-12 col-md-[1]">Column 1</div> <div class="col-12 col-md-[1]">Column 2</div> </div>
col-md-4 or col-md-3 which do not split evenly into two columns.Using col-12 for small screens and col-md-6 for medium screens creates one column on small and two equal columns on medium screens.
Fill both blanks to create a Bootstrap grid with three columns that stack on small screens and are side-by-side on large screens.
<div class="row"> <div class="col-[1] col-lg-[2]">Column 1</div> <div class="col-[1] col-lg-[2]">Column 2</div> <div class="col-[1] col-lg-[2]">Column 3</div> </div>
col-6 on small screens which does not stack columns.Using col-12 makes columns full width on small screens (stacked). Using col-lg-4 divides the row into three equal columns on large screens.
Fill all three blanks to create a Bootstrap layout with a header, main content area with two columns, and a footer.
<header class="container [1]"> <h1>Site Header</h1> </header> <main class="container"> <div class="row"> <section class="col-[2]">Main Content</section> <aside class="col-[3]">Sidebar</aside> </div> </main> <footer class="container text-center"> <p>Site Footer</p> </footer>
text-left in header which does not center text.The header uses text-center to center the title. The main content uses col-8 and the sidebar uses col-4 to create a 2-column layout.
