property

align-content — CSS reference

Distributes flex lines along the cross axis in a multi-line flex container. It has no effect on a nowrap flex container. Normal behaves as stretch in flex layout; align-items instead aligns items within lines.

Formal Syntax & Structure

css syntaxcss
normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS flex layout lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#p{display:flex;width:300px;height:120px;background:#e6eef2;align-items:flex-start} #p>*{box-sizing:border-box;flex:none;width:60px;height:30px;background:#128579;color:white} #b{background:#326c9d} #c{background:#6655a0}#p{width:130px;flex-wrap:wrap;align-content:space-between}</style><body><div id="p"><div id="a">A</div><div id="b">B</div><div id="c">C</div></div></body></html>
CSS Reference