
Layouts can be classified by how they respond to available space and by the CSS mechanism used to place elements. These are separate choices: a responsive page might use normal flow, Flexbox, and Grid together.
1. Fixed and elastic layouts
A fixed width such as 960px can exceed the viewport. An elastic width in em changes with the reference font size, but can still overflow on a small screen.
2. Fluid and bounded layouts
Percentage widths can follow the containing block. Add a maximum width to keep text readable on wider screens, and use padding on small screens.
.page { width: min(100% - 2rem, 70rem); margin-inline: auto; }3. Responsive layouts
Start with a flexible baseline. Add a breakpoint where the content needs more room. See CSS media queries.
4. Block layout and floats
Normal block flow suits articles and other content read top to bottom. Floats still wrap text around images, but are harder to maintain as the basis of an entire page.
5. Flexbox and Grid
Flexbox fits alignment along one main axis. Grid makes it easier to coordinate rows and columns. Use each at the component level where its model suits the job.
.nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }6. Practice
Compare a fixed layout with a fluid one at narrow and wide viewport widths and at 200% zoom. Explain where each begins to overflow or becomes harder to read.