Complete the code to create a sidebar container using Bootstrap classes.
<div class="[1] bg-light vh-100 p-3"> Sidebar content here </div>
container instead of a column class.d-flex alone without column sizing.The col-3 class creates a sidebar column that takes about 1/4 of the width in Bootstrap's grid system.
Complete the code to create a Bootstrap row that holds the sidebar and content area.
<div class="container-fluid"> <div class="[1]"> <!-- Sidebar and content go here --> </div> </div>
container inside another container-fluid.d-flex instead of row for grid layout.The row class groups columns horizontally in Bootstrap's grid system.
Fix the error in the sidebar column class to make it responsive and fixed height.
<div class="col-md-3 [1] bg-light p-3"> Sidebar content </div>
h-100 which sets height to 100% of parent, not viewport.fixed-top which fixes position at top but not height.The vh-100 class sets the height to 100% of the viewport height, making the sidebar full height.
Fill both blanks to create a content area that fills remaining space and has padding.
<div class="[1] p-4"> Main content area </div>
container inside the row instead of a column.flex-grow-1 without a flex container.The col-md-9 class creates a content column that takes the remaining width next to a col-md-3 sidebar.
Fill all three blanks to create a responsive sidebar layout with a header and content area.
<header class="bg-primary text-white p-3"> <h1>[1]</h1> </header> <div class="container-fluid"> <div class="row"> <nav class="[2] bg-light p-3 vh-100"> Sidebar links </nav> <main class="[3] p-4"> Main content goes here </main> </div> </div>
The header shows the site title. The sidebar uses col-md-3 for width and full height with vh-100. The main content uses col-md-9 to fill the rest of the row.
