🌐Fluid Layout
Also known as Liquid Layout, Flexible Layout, Fluid Grid
A layout whose widths stretch with the screen instead of staying fixed.
Think of it like
It is like a rubber band. It stretches and shrinks to fit the space it has.
Example
A blog's text column is 90% of the screen on a phone. On a wide monitor it stops growing at 700 pixels.
Why it matters
It fills the space between breakpoints, so no screen width looks broken.
Definition
Example code
css
.content {
width: 90%;
max-width: 700px;
margin-inline: auto;
}Common mistake
Key takeaways
- 1Relative sizes. Percent and fractions.
- 2Smooth in between. Between breakpoints.
- 3Cap the width. A max-width for text.