liveBook · Manning

Alignment

As explained in Design for Developers

A visual design principle that positions elements along shared edges, axes, or guides.

Alignment positions elements along shared edges, centers, or other invisible lines. It gives a page structure and helps people see which pieces of content belong together. A layout can follow the browser’s rules and still feel disjointed if its visual alignments do not support those relationships. section 2.1.2 section 2.3

When arranging a component or page, check three things:

  • Edges and centers: do related elements share a clear left, right, top, bottom, or center line? section 2.1.2
  • Text: does its alignment reinforce the component’s overall alignment, or make the component feel less cohesive? section 2.1.2
  • Sections: is an alignment change helping distinguish content, or merely interrupting the page’s order? section 2.1.2

A headline, description, and button

Picture a headline and button aligned left, with the description between them centered. The pieces can feel disconnected even though they form one group. Aligning all three left gives the group a clearer shared line. section 2.1.2

Figure 2.24 Aligning all the content to the left and moving the hotel name below the image gives the illusion that each component is a rectangle and establishes a more orderly feeling on the page.

Compare this orderly arrangement of hotel cards with the center-aligned names in the preceding example: placing each name below its image and aligning the content left makes each card feel like one unit. section 2.1.2

CSS Grid and Flexbox provide layout structure, but choosing useful alignments is still a design decision. Check alignment while planning the layout, then revisit it as content and components take shape. Use it alongside proximity, repetition, contrast, and balance to make relationships easier to scan. section 2.1.2 section 2.3

How Design for Developers covers it

How deep it goes
Defines edge, center, and text alignment through layout comparisons, but stops short of a CSS implementation walkthrough.
Examples
Compares mixed and consistent alignment in a headline-and-button group, alternating page sections, and hotel cards.
What it assumes
Assumes familiarity with web layout and CSS while introducing the underlying design principle in plain terms.
What you can do after
Practice/perform alignment checks on text, components, and sections to make web layouts feel more cohesive.
How it connects
Connects alignment to proximity, repetition, contrast, balance, visual hierarchy, and wireframing.

Also explained in

Compare how 4 books explain alignment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Design for Developers. The section links point to the parts of the book it draws on.