What does "elastic layout" mean?
Elastic layout is a type of layout in which element sizes are set in relative units that depend on the font size (usually em or rem). Such a layout is "elastic" not relative to the browser window width, but relative to the base text size, so when the font changes, both the blocks and the whole interface grow (or shrink).
Key features:
- block widths in
emorrem, not inpxor% - the interface scales proportionally to the change in text size
- the user can increase the font size, and the layout does not "break"
In comparison:
| Layout type | Main dependency |
|---|---|
| Fluid / liquid | on the window width (%) |
| Elastic | on the font size (em, rem) |
| Fixed | fixed px |
Summary: Elastic layout is a layout that scales together with the text, preserving the interface's proportions by using em/rem units.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.