Flex box Basic tutorial Harry


 Flex box HTML Source Code

<!DOCTYPE html>
<html lang="en">
<head>
    <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>Flex Box</title>
    <link rel="stylesheet" href="flex.css.css">
</head>
<body>
    <div class="fcontainer">
            <div class="fitem">1</div>
            <div class="fitem">2</div>
            <div class="fitem">3</div>
            <div class="fitem">3</div>
    </div>
</body>
</html>

CSS SOURCE CODE

.fcontainer{
    border: 2px solid grey;
    height: 45vh;
    display: flex;
    /* flex-direction: column-reverse; */
    /* justify-content: flex-end; */
    /* justify-content: flex-start; */
    /* justify-content: center; */
    /* align-items: center; mainly we use this
    align-items: flex-end;
    align-items: flex-start; */
    /* flex-wrap: wrap; */ we use wrap for making responsive on mobiles
    /* flex-wrap: wrap-reverse; */
    /* flex-flow: column wrap; */
   
   
}

.fitem{
    background-color: red;
    border: 2px solid black;
    margin:12px;
    width: 122px;
    height: 122px;
}

Comments

Popular posts from this blog