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:200px;
  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:center;
  align-items:stretch;
}
.items{
  //height:50px;
  margin:5px;
  width:50px;
  color:black;
  background-color:blue;
  text-align:center;
  line-height:50px;
  font-weight:60%;
}