Edit in JSFiddle

<div class="container">
  <div class="item red">20px</div>
  <div class="item blue">50px</div>
  <div class="item green">100px</div>
</div>
.container {
  display: flex;
}

.item {
  height: 50px;
  margin: 10px;
  padding: 10px;
  text-align: center;

  &.red {
    background: rgba(255, 0, 0, 0.7);
    flex-basis: 20px;
  }

  &.blue {
    background: rgba(0, 255, 0, 0.7);
    flex-basis: 50px;
  }

  &.green {
    background: rgba(0, 0, 255, 0.7);
    flex-basis: 100px;
  }
}