The align-items property of flex-box aligns the items inside a flex container along the cross axis just like justify-content does along the main axis. (For the default flex-direction: row the cross axis corresponds to vertical and the main axis corresponds to horizontal. With flex-direction: column those two are interchanged respectively).

Here's an example of how align-items:center looks:

But align-content is for multi line flexible boxes. It has no effect when items are in a single line. It aligns the whole structure according to its value. Here's an example for align-content: space-around;:

And here's how align-content: space-around; with align-items:center looks:

Note the 3rd box and all other boxes in first line change to vertically centered in that line.

Here are some codepen links to play with:

http://codepen.io/asim-coder/pen/MKQWbb

http://codepen.io/asim-coder/pen/WrMNWR

Here's a super cool pen which shows and lets you play with almost everything in flexbox.

Answer from Asim K T on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › align-items
align-items - CSS | MDN
The CSS align-items property sets the align-self value on all direct children as a group. In flexbox, it controls the alignment of items on the cross axis. In grid layout, it controls the alignment of items on the block axis within their grid areas.
🌐
W3Schools
w3schools.com › cssref › css3_pr_align-items.php
CSS align-items property
The align-items property specifies the default alignment for items inside a flexbox or grid container.
🌐
CSS Reference
cssreference.io › property › align-items
align-items - CSS Reference
Defines how flexbox items are aligned according to the cross axis, within a line of a flexbox container.
🌐
Mimo
mimo.org › glossary › css › align-items
CSS align-items property: Syntax, Usage, and Examples
Use CSS align-items to align flex or grid items on the cross axis—center, start, end, baseline, or stretch—for clean, consistent layouts.
🌐
Scaler
scaler.com › home › topics › css align-items property
CSS align-items Property - Scaler Topics
May 3, 2023 - The align item (align-items) is a property of CSS that specifies the default alignment of any content inside the flexible container. We should generally use the align-self property of each item to override the align item property of CSS.
🌐
CSS-Tricks
css-tricks.com › almanac › properties › a › align-items
align-items | CSS-Tricks
April 19, 2025 - The align-items property defines the default behavior for how items are laid out along the cross axis (perpendicular to the main axis).
Find elsewhere
🌐
Tailwind CSS
tailwindcss.com › docs › align-content
align-content - Flexbox & Grid - Tailwind CSS
Utilities for controlling how rows are positioned in multi-row flex and grid containers.
🌐
Medium
medium.com › @chrisroyalty001 › understanding-css-align-content-align-items-and-align-self-998b7db0ec6a
Understanding align-content , align-items, and align-self: | by Ugwuanyi Chibuikem Christian | Medium
August 24, 2024 - Purpose: Allows individual items to override the alignment set by `align-items` and align themselves differently. Applies To: Individual flex or grid items. Effect: Adjusts the alignment of a specific item along the cross-axis.
🌐
W3Schools
w3schools.com › css › css3_flexbox_container_align.asp
CSS Flexbox align-items and align-content
The align-items property aligns the flex items vertically (on the cross-axis).
🌐
W3Schools
w3schools.com › css › css_align.asp
CSS Center Align
Flexbox Container Flexbox Justify Content Flexbox Align Items Code Challenge Flex Items · Flex Items Code Challenge Flex Responsive · Flex Responsive Code Challenge · Grid Intro · Grid Intro Code Challenge Grid Container · Grid Container Grid Tracks Grid Gaps Grid Align Code Challenge Grid Items ·
🌐
Tailwind CSS
tailwindcss.com › docs › align-items
align-items - Flexbox & Grid - Tailwind CSS
Utilities for controlling how flex and grid items are positioned along a container's cross axis.
🌐
Reality Ripple
udn.realityripple.com › docs › Web › CSS › align-items
align-items - CSS: Cascading Style Sheets
The CSS align-items property sets the align-self value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis.
🌐
Bootstrap
getbootstrap.com › docs › 5.3 › utilities › flex
Flex · Bootstrap v5.3
Use align-items utilities on flexbox containers to change the alignment of flex items on the cross axis (the y-axis to start, x-axis if flex-direction: column).
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Guides › Flexible_box_layout › Aligning_items
Aligning items in a flex container - CSS | MDN
Flexbox provides several properties to control alignment and spacing, with align-items and justify-content being fundamental for centering elements. To center an element, we use the align-items property to align the item on the cross axis, which in this case is the block axis running vertically.
🌐
Till it's done
tillitsdone.com › blogs › css-property-align-items
CSS align-items A Comprehensive Guide
CSS align-items is a powerful property for aligning flex and grid items. Learn how to use it with options like center, start, end, and stretch. Enhance your web design skills with practical examples and browser compatibility details.
🌐
Bootstrap
getbootstrap.com › docs › 4.0 › utilities › flex
Flex · Bootstrap
Use align-items utilities on flexbox containers to change the alignment of flex items on the cross axis (the y-axis to start, x-axis if flex-direction: column).
🌐
TutorialsPoint
tutorialspoint.com › css › css_align-items.htm
CSS - align-items Property
CSS align-items property collectively sets the align-self value for all immediate children. In Flexbox, it aligns items on the Cross Axis, while in Grid Layout, it aligns items on the Block Axis within their grid area.
🌐
Tutorjoes
tutorjoes.in › css_tutorial › align_items_in_css
A Comprehensive Guide to CSS Align Items Property
This can be useful when you want to create a layout where all the items have the same height. ... align-items: stretch sets the vertical alignment of the items to stretch, so they fill the entire height of the container along the cross axis.
🌐
CSS-Tricks
css-tricks.com › a-quick-way-to-remember-difference-between-justify-content-align-items
A Quick Way to Remember the Difference Between `justify-content` and `align-items` | CSS-Tricks
April 5, 2018 - When you have only two options and you mix them up, the best way is to remember the easier one. Only remember “justify-content” that acts like font justifying horizontally. So, align-items will be just opposite assuming the default flex-flow in action.