Production UIs reuse a handful of layouts. Bootstrap composes them from grid + flex + spacing utilities without a new stylesheet each time.
Patterns to recognize
- Holy grail shell — header/footer full width,
containermain, sidebarcol-lg-3+ contentcol-lg-9 - Card deck —
row row-cols-1 row-cols-md-3 g-4withh-100cards - Sticky footer —
min-vh-100 d-flex flex-columnon body wrapper,mt-autoon footer - Split hero — two
col-md-6columns withalign-items-centeron the row
Important interview questions and answers
- Q: How do you equalize card heights in a row?
A: Useh-100on cards inside a row with equal-height columns, or flex column layout inside each card. - Q: Grid vs flex for a dashboard sidebar?
A: Grid columns for the shell; flex inside the sidebar for stacked nav links.
Self-check
- Write the row classes for three equal cards on md+ and one column on mobile.
- Which utility pushes a footer to the bottom in a sticky-footer layout?