Complete the code to make the container a flexbox using Bootstrap classes.
<div class="container [1]"> <div>Item 1</div> <div>Item 2</div> </div>
Bootstrap uses the d-flex class to apply display: flex; to an element.
Complete the code to align flex items horizontally centered using Bootstrap classes.
<div class="d-flex [1]"> <div>Item 1</div> <div>Item 2</div> </div>
align-items-center which centers vertically, not horizontally.justify-content-start which aligns items to the start.The class justify-content-center centers flex items horizontally in Bootstrap.
Fix the error in the code to make flex items stack vertically using Bootstrap classes.
<div class="d-flex [1]"> <div>Item 1</div> <div>Item 2</div> </div>
flex-row which keeps items in a row (horizontal).The class flex-column makes flex items stack vertically in Bootstrap.
Fill both blanks to create a flex container that wraps items and aligns them vertically centered.
<div class="d-flex [1] [2]"> <div>Item 1</div> <div>Item 2</div> <div>Item 3</div> </div>
flex-nowrap which prevents wrapping.justify-content-center which aligns horizontally, not vertically.flex-wrap allows items to wrap to the next line, and align-items-center vertically centers them.
Fill all three blanks to create a flex container with vertical stacking, vertical centering, and wrapping enabled.
<div class="d-flex [1] [2] [3]"> <div>Item 1</div> <div>Item 2</div> <div>Item 3</div> <div>Item 4</div> </div>
flex-row which stacks items horizontally.flex-wrap to allow wrapping.flex-column stacks items vertically, justify-content-center centers them vertically, and flex-wrap allows wrapping.