Reviewed July 2026. This article was substantially updated to reflect current web standards and practices.
Responsive design is no longer an optional enhancement or a synonym for shrinking desktop columns. It is the practice of making content and interactions work across changing viewport sizes, container sizes, input methods, zoom levels, and user preferences.
Begin with flexible foundations
Use fluid grids, flexible media, sensible maximum widths, and relative sizing where it improves adaptation. Let content define when a layout needs to change instead of targeting a list of device models.
Design components for their containers
Grid and Flexbox handle most page and component layouts. Container queries can adapt a component to the space available in its parent, which is especially useful for reusable cards, sidebars, and embedded tools.
Keep interaction responsive too
Navigation, forms, tables, dialogs, carousels, hover states, and drag interactions need alternatives for touch, keyboard, and assistive technology. Preserve reading order and visible focus when the visual arrangement changes.
Test beyond width
Check text zoom, landscape orientation, reduced motion, high contrast, long labels, slow connections, and real content. A layout can fit the screen and still fail the person using it.
Plan behavior, not device screenshots
For each component, define what may wrap, stack, scroll, crop, collapse, or disappear and why. A comparison table may need horizontal scrolling with persistent headers, while a service grid may become a single reading column. A navigation menu may collapse, but every destination and its current state must remain available.
Responsive media and typography
Use responsive image markup when different source sizes or crops improve delivery. Set width and height attributes or an aspect ratio to reserve space. Let text size respond within accessible limits, but do not scale it only from viewport width. Keep line length readable and allow headings, buttons, and labels to wrap.
Testing matrix
- Narrow phone, wide phone, tablet, laptop, and wide desktop.
- Portrait and landscape where orientation changes the task.
- Keyboard, touch, pointer, and screen-reader navigation.
- Text zoom and browser zoom without horizontal page overflow.
- Reduced motion, forced colors, dark mode if supported, and high contrast.
- Slow connections and delayed media.
- Short, long, empty, and translated content.
Do not assume the most popular analytics viewport represents all users. Responsive quality comes from flexible rules and representative edge cases. Use analytics to prioritize testing, not to exclude people whose devices or settings are less common.
