JSFiddle - React, Tailwind, and code Playground

by slym12

HTML

<div id="wrapper">
  <div id="div1">The two divs are</div>
<div id="div2">next to each other.</div>
</div>

CSS

* {
  box-sizing: border-box;
}
#wrapper {
  border: 1px solid blue;
  display: flex;
  flex-wrap:wrap;
  /* padding: 0 5%; */
  justify-content: space-evenly;
}
#div1, #div2 {
 
  width:40%;
}
#div1 {
  display: inline-block;
/*   width: 50%; */
  height: 120px;
  border: 1px solid red;
  flex-grow:1;
}
#div2 {
  display: inline-block;
  /* width: 50%; */
  flex-grow:1;
  height: 160px;
  min-width:200px;
  max-width: 50%;
  border: 1px solid green;
  margin: 0 auto;
}