CSS adds vertical centering with align-content 2024.

After decades of CSS development, vertical centering has finally become a simple task with the introduction of the align-content property in 2024. This new feature allows developers to vertically center content using a single CSS property, without the need for complex workarounds like flexbox or grid layouts.

James Smith provides a historical overview of the various methods used for vertical centering in the past, ranging from table cells and absolute positioning to flexbox and grid layouts. Each method is evaluated for its “sanity” level, highlighting the convoluted and often unintuitive nature of CSS alignment prior to the align-content addition.

UI & UX design inspiration for mobile & web apps.

orbs




Get Fountn

Pro friends get unlimited Figma conversions, bookmarks and collections.

Free Forever

$0

1 Figma conversion/day

5 collections

15 bookmarks

Limited access to new features

Current Plan

Fountn Pro

$6

Unlimited Figma conversions

Unlimited collections

Unlimited bookmarks

Full access to new features

Upgrade to Pro

You've reached your free limit. Upgrade for unlimited access.