JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container"><!-- flex container -->

    <div class="divs" id="bluebox"><!-- flex item -->
        <p>First Div</p>
    </div>

    <div class="divs" id="redbox"><!-- flex item -->
        <p>Second Div</p>
    </div>

</div>

CSS

#container {
    display: flex;           /* establish flex container */
    flex-direction: row;  /* make main axis horizontal */
    justify-content: center; /* center items vertically, in this case */
    align-items: center;     /* center items horizontally, in this case */
    height: 200px;
}

.divs {
    width: 200px;
    margin: 5px;
    color:white;
    text-align: center;     /* will center text in <p>, which is not a flex item */
}
#redbox{
  background-color:red;
}
#bluebox{
  background-color:blue;
}