/    Sign up×
Reference /Pin to ProfileBookmark

align-content

Specifies how much space between and around items along a flexbox’s cross-axis or a grid’s block axis

Syntax

/*
    align-content: center;
    align-content: normal;
*/

Values

start
items are packed right next to each other against the start edge of the alignment container in the cross axis

end

items are packed next to each other against the end edge of the alignment container in the cross axis

flex-start

items are packed next to each other against the edge of the alignment container depending not the container’s cross-start side. If the items are not children of a flex container, this value is treated like start.

flex-end

items are packed flush to each other 

center

items are packed next to each other in the center of the alignment container along the cross axis

normal

items are packed in their default position

baseline, first baseline, last baseline

aligns the alignment baseline of the box’s first or last baseline set with the corresponding baseline in the shared first or last baseline set of all the boxes in its baseline-sharing group

space-between

the items are distributed evenly within the alignment container along the cross axis.

space-around

items are distributed evenly within the alignment container along the cross axis

Browser Compatibilty

Demos

Have a code example of align-content? Submit a codepen.io demo and we'll showcase it here

to submit a demo.
CSS
×

Success!

Help @reference spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...