CSS Align

The CSS align-content property sets the distribution of space between and around content items along a flexbox’s cross-axis or a grid’s block axis.


align-content: stretch|center|flex-start|flex-end|space-between|space-around|initial|inherit;


<!DOCTYPE html>
<html lang="en">

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS align</title>
        #main {
            width: 70px;
            height: 300px;
            border: 1px solid #cf9c9c;
            display: flex;
            flex-wrap: wrap;
            align-content: center;

        #main div {
            width: 70px;
            height: 70px;

    <h1>The align-content Property</h1>

    <div id="main">
        <div style="background-color:rgb(156, 80, 255);"></div>
        <div style="background-color:rgb(208, 230, 173);"></div>
        <div style="background-color:rgb(241, 18, 55);"></div>



Leave a Reply