FLEXBOX IN CSS FULL CHAPTER

 <!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            /* Also flex shrink can be used if the other flex will flow over it */
        .container{
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            background-color: rgb(86, 183, 232);
            height: 60vh;
            align-items: center;
            /* flex-wrap: wrap-reverse; */
            /* flex-direction: column; */
            /* flex-direction: row-reverse;
            flex-direction: column-reverse; */
        }
        .box1{
            background-color: rgb(49, 4, 164);
            width: 200px;
            height: 200px;
            border: 2px solid;
            /* flex-grow: 1; */
         
        }
        .box2{
            background-color: rgb(226, 2, 2);
            width: 200px;
            height: 200px;
            border: 2px solid;
            /* float: right;
            clear: right; */
            /* align-self: flex-end; */
        }
        .box3{
            background-color: rgb(239, 255, 15);
            width: 200px;
            height: 200px;
            border: 2px solid;
            /* float: right;
            clear: right; */
            order: -3;
        }
        .box4{
            background-color: rgb(255, 15, 167);
            width: 200px;
            height: 200px;
            border: 2px solid;
            /* float: right;
            clear: right; */
        }

    </style>
    </head>
    <body>
        <div class="container">
            <div class="box1">box1</div>
            <div class="box2">box2</div>
            <div class="box3">box3</div>
            <div class="box4">box4</div>
        </div>
    </body>
</html>

Comments