JSFiddle - React, Tailwind, and code Playground

by Pritam Bohra

HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body> 
    <div class="container">
      <div class="div one">1</div>
      <div class="div two">2</div>
      <div class="div three">3</div>
      <div class="div four">4</div>
      <div class="div five">5</div>
    </div>
  </body>
</html>

CSS

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

.container {
  background-color: #dfdfdf;
  width: 100%;
  display: flex;
  flex-direction: row;
  height: 100%;
  justify-content: flex-start;
  align-items: center;
}

.div {
 color: #ffffff;
 font-weight: 700;
 text-align: center;
 margin: 5px;
}

.one {
  background-color: lightgreen;
  /* width: 60px; */
  height: auto;
  flex-basis: 150px;
}

.two {
  background-color: goldenrod;
  width: 80px;
  height: auto;
  align-self: auto;
}

.three {
  background-color: lightskyblue;
  width: 90px;
  height: auto;
}

.four {
  background-color: orange;
  width: 100px;
  height: auto;
}

.five {
  background-color: lightpink;
  width: 220px;
  height: auto;
}