Layout
A layout is the way individual interface elements are arranged on a web page — the header, content area, sidebar, navigation and footer. The layout determines their position, proportions and spatial relationships, deciding a page's readability, its information hierarchy and how comfortable it is to use.
How layout design works
Designing a layout usually starts with a sketch (a wireframe) that places content blocks without regard to the visual layer. During coding, the layout is implemented in CSS — the two main mechanisms are:
- Flexbox — arranging elements along a single axis (a row or a column), ideal for navigation bars and lists;
- CSS Grid — arranging elements in two dimensions at once, meant for building the complex grid of an entire page.
Based on how they behave as the screen width changes, layouts are classified as fixed, fluid and responsive, the last of which uses media queries to adapt the arrangement to the device size.
Practical application
A well-designed layout guides the user's eye across the most important page elements — from the header, through the offer, to the call to action. In practice, designers create grid, asymmetric, single- and multi-column layouts, as well as a hero section with a large banner on entry. The key is responsiveness: the same layout must look correct on a monitor, a tablet and a smartphone, rearranging columns and scaling elements according to the available space.
When designing a layout, it is worth keeping a few universal principles in mind: maintaining adequate spacing (whitespace), which organizes content and improves readability, and aligning elements to an invisible grid that conveys a sense of order. Visual hierarchy matters too — size, contrast and position tell the user what is most important. A good layout also works hand in hand with accessibility: a logical order of elements in the markup makes the page easier to use for people relying on screen readers and keyboard navigation.
Powiązane pojęcia
Najczęstsze pytania
What is the difference between a fixed and a fluid layout?
A fixed layout has a predetermined width in pixels, so on small screens it forces scrolling and on large ones it leaves empty margins. A fluid layout defines widths as percentages, so it stretches and shrinks with the browser window. Modern sites combine both approaches with media queries to create a responsive layout.
