Justify Content

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="stylesheet" href="justifyContent.css">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Justify Content</title>
</head>
<body>
    <h2>justifyContent:start</h2>

    <div id="outer" class="Outer">
        <div id="red"></div>
        <div id="green"></div>
        <div id="blue"></div>
    </div>

    <h2>justifyContent:end</h2>

    <div id="Outer">
        <div id="orange"></div>
        <div id="aqua"></div>
        <div id="black"></div>
    </div>


    <h2>justifyContent:center</h2>

    <div id="center">
        <div id="violet"></div>
        <div id="indigo"></div>
        <div id="yellow"></div>
    </div></body>
</html>

CSS 

#outer{
    height:500px;
    width: 500px;
    border: 2px solid black;
    margin:auto;
    display: flex;
    flex-direction: row-reverse;
    justify-content:start ;
justify-content: space-between;
}
#red{
    height:100px;
    width: 100px;
background-color: red;
}
#blue{
    height:100px;
    width: 100px;
background-color: blue;
}
#green{
    height:100px;
    width: 100px;
background-color: green;
}

#Outer{
    height:500px;
    width: 500px;
    border: 2px solid black;
    margin:auto;
    display: flex;
    flex-direction: row-reverse;
    justify-content:end ;
    justify-content: space-around;
}
#orange{
    height:100px;
    width: 100px;
background-color: orange;
}
#aqua{
    height:100px;
    width: 100px;
background-color: aqua;
}
#black{
    height:100px;
    width: 100px;
background-color: black;
}


#center{
    height:500px;
    width: 500px;
    border: 2px solid black;
    margin:auto;
    display: flex;
    flex-direction: row-reverse;
    justify-content:center;
    justify-content: space-evenly;
}
#violet{
    height:100px;
    width: 100px;
background-color: violet;
}
#indigo{
    height:100px;
    width: 100px;
background-color: indigo;
}
#yellow{
    height:100px;
    width: 100px;
background-color: yellow;
}

Comments

Popular posts from this blog

Assignment

OverFlow

FRONT-END PROJECT SPOTIFY CLONE