Web DevelopmentBeginnerhtml

Responsive Web Design

Build layouts that hold up from a 320px phone to a wide desktop, using the box model, relative units, Flexbox, Grid and queries that respond to content rather than to device names.

A responsive layout is one that adapts without a second set of pages. That sounds like it is about breakpoints, and it is not: breakpoints are the visible symptom. The real work is in the box model, in choosing units that can be relative to something, and in letting the browser do the arithmetic. This course starts from the two failures that make a page fail to be responsive — a fixed pixel width that overflows a narrow screen, and content that overflows for reasons no width rule can fix. It then builds the two layout systems you will actually reach for: Flexbox for one-dimensional arrangements and Grid for two-dimensional ones. It covers media queries and container queries, with the point made that the useful breakpoint is wherever the design breaks rather than wherever a device is. By the end you can take a design and implement it so that it holds at 320px, at 1280px, and at the awkward widths in between that nobody designs for and everybody has to live with.

4.6 (120) 1,060 students 139 min 15 lessons 150 XP on completion

What you will be able to do

  • Explain why a fixed pixel width causes horizontal overflow, and reach for fluid units and intrinsic sizing instead
  • Use the box model, including border-box, so declared widths mean what you expect
  • Choose between Flexbox and Grid from the shape of the layout problem, and say why
  • Place breakpoints where the content breaks rather than at device widths, and use container queries to respond to a component's own space
  • Size type and images so they scale without breaking the layout or costing a needless amount of bandwidth

Assessments

Dashboard