Skip to content

Instantly share code, notes, and snippets.

@teethnclaws
Created March 5, 2019 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teethnclaws/f2ba56b7411c6dfb3ea3968f017a2ab6 to your computer and use it in GitHub Desktop.
Save teethnclaws/f2ba56b7411c6dfb3ea3968f017a2ab6 to your computer and use it in GitHub Desktop.
JS Bin justify-content start // source https://jsbin.com/copopir
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="justify-content start">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.container{
display: flex;
}
.one{
/* default */
justify-content: flex-start;
}
.two{
justify-content: flex-end;
}
.three{
justify-content: center;
}
.four{
justify-content: space-between;
}
.five{
justify-content: space-around;
}
/*basic styling*/
.container{
border: 4px solid #61585E;
margin-bottom: 10px;
}
.container > *{
background-color: #EA3556;
padding: 5px;
color: white;
width: 100px;
height: 60px;
}
.container > *:nth-child(even){
background-color: #49AEC0;
}
</style>
</head>
<body>
<!-- BEGIN LESSON CODE -->
<div class="container one">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<div class="container two">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<div class="container three">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<div class="container four">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<div class="container five">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<!-- END LESSON CODE -->
<script id="jsbin-source-css" type="text/css">.container{
display: flex;
}
.one{
/* default */
justify-content: flex-start;
}
.two{
justify-content: flex-end;
}
.three{
justify-content: center;
}
.four{
justify-content: space-between;
}
.five{
justify-content: space-around;
}
/*basic styling*/
.container{
border: 4px solid #61585E;
margin-bottom: 10px;
}
.container > *{
background-color: #EA3556;
padding: 5px;
color: white;
width: 100px;
height: 60px;
}
.container > *:nth-child(even){
background-color: #49AEC0;
}</script>
</body>
</html>
.container{
display: flex;
}
.one{
/* default */
justify-content: flex-start;
}
.two{
justify-content: flex-end;
}
.three{
justify-content: center;
}
.four{
justify-content: space-between;
}
.five{
justify-content: space-around;
}
/*basic styling*/
.container{
border: 4px solid #61585E;
margin-bottom: 10px;
}
.container > *{
background-color: #EA3556;
padding: 5px;
color: white;
width: 100px;
height: 60px;
}
.container > *:nth-child(even){
background-color: #49AEC0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment