flex-align-items

.

by loebmraz

HTML

<div class="parent">
  <div id="child1">

  </div>
  <div id="child2">

  </div>
  <div id="child3">

  </div>
  <div id="child4">
  
  </div>
</div>

CSS

.parent {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100px;
  border: solid 2px green;
}

#child1 {
  background: black;
  width: 50px;
  min-height: 30px;
}

#child2 {
  background: yellow;
  width: 100px;
  height: 90px;
}

#child3 {
  background: red;
  width: 30px;
  height: 50px;
}

#child4{
  background: blue;
  width: 40px;
  height: 70px;
}