Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

align-items #562

@oldoc63

Description

@oldoc63
  • In the previous exercise, you learned how to justify the content of a flex container from left to right across the page.

  • It is also possible to align flex items vertically within the container.

  • The align-items property makes it possible to space flex items vertically.
    .container { align-items: baseline; }

  • Below are five commonly used values for the align-items property:

    flex-start — all elements will be positioned at the top of the parent container.
    flex-end — all elements will be positioned at the bottom of the parent container.
    center — the center of all elements will be positioned halfway between the top and bottom of the parent container.
    baseline — the bottom of the content of all items will be aligned with each other.
    stretch — if possible, the items will stretch from top to bottom of the container (this is the default value; elements with a specified height will not stretch; elements with a minimum height or no height specified will stretch).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions