Skip to content

💡 Let's understand Justify Content #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
271 changes: 271 additions & 0 deletions Justify-Content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Justify Content</title>

<!--Style tag-->
<style>
body {
padding: 0%;
margin: 0%;
font-family: 'Work Sans';
scroll-behavior: smooth;
}

h1 {
text-align: center;
font-weight: 400;
}

#container {
width: 80%;
height: 500px;
margin: 0px auto;
background-color: rgb(11, 28, 73);
border: 5px solid rgb(11, 28, 73);
display: flex;
flex-direction: row;
justify-content: flex-start;
}

#container div {
width: 200px;
height: 200px;
}

#container-1 {
width: 80%;
height: 500px;
background-color: rgb(11, 28, 73);
border: 5px solid rgb(11, 28, 73);
margin: 0px auto;
display: flex;
flex-direction: row;
justify-content: flex-end;
}

#container-1 div {
width: 200px;
height: 200px;
}

#container-2 {
width: 80%;
height: 500px;
margin: 0px auto;
background-color: rgb(11, 28, 73);
border: 5px solid rgb(11, 28, 73);
display: flex;
flex-direction: row;
justify-content:space-around ;
}

#container-2 div {
width: 200px;
height: 200px;
}

#container-3 {
width: 80%;
height: 500px;
margin: 0px auto;
background-color: rgb(11, 28, 73);
border: 5px solid rgb(11, 28, 73);
display: flex;
flex-direction: row;
justify-content: space-between;
}

#container-3 div {
width: 200px;
height: 200px;
}

#container-4{
width: 80%;
height: 500px;
margin: 0px auto;
background-color: rgb(11, 28, 73);
border: 5px solid rgb(11, 28, 73);
display: flex;
flex-direction: row;
justify-content: space-evenly;
}

#container-4 div{
width: 200px;
height: 200px;
}


#container-5{
width: 80%;
height: 1200px;
margin: 0px auto;
border: 5px solid rgb(11, 28, 73);
background-color: rgb(11, 28, 73) ;
display: flex;
flex-direction: column;
justify-content: flex-start;
}

#container-5 div{
width: 200px;
height: 200px;
}

#container-6{
width: 80%;
height: 1200px;
margin: 0px auto;
border: 5px solid rgb(11, 28, 73);
background-color: rgb(11, 28, 73) ;
display: flex;
flex-direction: column;
justify-content:flex-end;
}

#container-6 div{
width: 200px;
height: 200px;
}

#container-7{
width: 80%;
height: 1200px;
margin: 0px auto;
border: 5px solid rgb(11, 28, 73);
background-color: rgb(11, 28, 73) ;
display: flex;
flex-direction: column;
justify-content:space-around;
}

#container-7 div{
width: 200px;
height: 200px;
}

#container-8{
width: 80%;
height: 1200px;
margin: 0px auto;
border: 5px solid rgb(11, 28, 73);
background-color: rgb(11, 28, 73) ;
display: flex;
flex-direction: column;
justify-content:space-between;
}

#container-8 div{
width: 200px;
height: 200px;
}

#container-9{
width: 80%;
height: 1200px;
margin: 0px auto;
border: 5px solid rgb(11, 28, 73);
background-color: rgb(11, 28, 73) ;
display: flex;
flex-direction: column;
justify-content:space-evenly;
}
#container-9 div{
width: 200px;
height: 200px;
}

</style>

</head>
<body>
<!--Justify content row vise which is the main axis-->

<h1>Let's Understand Justify Content[Row]</h1>

<caption>Justify Content - Flex-start</caption>
<section id="container">
<div style="background-color:#A7EDE7 ;"></div>
<div style="background-color:#45CFDD;"></div>
<div style="background-color:#9681EB ;"></div>
<div style="background-color:#6527BE;"></div>
</section>

<caption>Justify Content - Flex-end</caption>
<section id="container-1">
<div style="background-color:#A7EDE7 ;"></div>
<div style="background-color:#45CFDD;"></div>
<div style="background-color:#9681EB ;"></div>
<div style="background-color:#6527BE;"></div>
</section>

<caption>FJustify Content - Space-around</caption>
<section id="container-2">
<div style="background-color:#DAFFFB ;"></div>
<div style="background-color:#64CCC5 ;"></div>
<div style="background-color:#176B87 ;"></div>
<div style="background-color:#001C30 ;"></div>
</section>

<caption>Justify Content - Space-between</caption>
<section id="container-3">
<div style="background-color:#DAFFFB ;"></div>
<div style="background-color:#64CCC5 ;"></div>
<div style="background-color:#176B87 ;"></div>
<div style="background-color:#001C30 ;"></div>
</section>

<caption>Justify Content - Space-evenly</caption>
<section id="container-4">
<div style="background-color:#F4EEFF ;"></div>
<div style="background-color:#DCD6F7 ;"></div>
<div style="background-color:#A6B1E1 ;"></div>
<div style="background-color:#424874 ;"></div>
</section>

<!--Justify content column vise which is the cross axis-->
<h1>Let's Understand Justify Content[Column]</h1>

<caption>Justify Content - Flex-start</caption>
<section id="container-5">
<div style="background-color:#A7EDE7 ;"></div>
<div style="background-color:#45CFDD;"></div>
<div style="background-color:#9681EB ;"></div>
<div style="background-color:#6527BE;"></div>
</section>

<caption>Justify Content - Flex-end</caption>
<section id="container-6">
<div style="background-color:#A7EDE7 ;"></div>
<div style="background-color:#45CFDD;"></div>
<div style="background-color:#9681EB ;"></div>
<div style="background-color:#6527BE;"></div>
</section>

<caption>FJustify Content - Space-around</caption>
<section id="container-7">
<div style="background-color:#DAFFFB ;"></div>
<div style="background-color:#64CCC5 ;"></div>
<div style="background-color:#176B87 ;"></div>
<div style="background-color:#001C30 ;"></div>
</section>

<caption>Justify Content - Space-between</caption>
<section id="container-8">
<div style="background-color:#DAFFFB ;"></div>
<div style="background-color:#64CCC5 ;"></div>
<div style="background-color:#176B87 ;"></div>
<div style="background-color:#001C30 ;"></div>
</section>

<caption>Justify Content - Space-evenly</caption>
<section id="container-9">
<div style="background-color:#F4EEFF ;"></div>
<div style="background-color:#DCD6F7 ;"></div>
<div style="background-color:#A6B1E1 ;"></div>
<div style="background-color:#424874 ;"></div>
</section>
</body>
</html>