flexbox basic
by Berat Emre NebioÄźlu
HTML
<div class="parent">
<div class="items">John</div>
<div class="items">Mike</div>
<div class="items">Tom</div>
<div class="items">Peter</div>
<div class="items">Jack</div>
</div>
CSS
.parent
{
border: 1px solid black;
width:600px;
height:100px;
display:flex;
flex-wrap:wrap;
flex-direction:row;
//flex-direction:row-reverse;
//flex-direction:column;
//flex-direction:column-reverse;
// justify-content: flex-start;
//justify-content: flex-end;
//justify-content: center;
//justify-content: space-between;
// justify-content: space-around;
//align-items:flex-start;
//align-items:flex-end;
// align-items:end;
// align-items::stretch;
//align-content:flex-start;
// align-content:flex-end;
// align-content:center;
// align-content:stretch;
// align-content:space-around;
//align-content:space-between;
}
.items{
// height:50px;
margin:5px;
// width:150px;
color:black;
background-color:blue;
text-align:center;
line-height:50px;
font-weight:60%;
flex-grow:1;
}
.items:nth-child(2){
order:1;
}
.items:nth-child(3){
order:2;
// flex-grow:3
}
.items:nth-child(1){
order:3;
}
.items:nth-child(5){
flex-grow:2;
}