JSFiddle - React, Tailwind, and code Playground

HTML

<div id="main">
    <div id="top"></div>
    <div id="mid" class="cf">
        <div class="item">item</div>
        <div class="item">item</div>
        <div class="item">item</div>
        <div class="item">item</div>
        <div class="item">item</div>
        <div class="item">item</div>
    </div>
    <div id="bottom"></div>
</div>

CSS

#main {
    width: 300px;
    background: black;
}
#top {
    height: 1px;
    width: 300px;
    background: yellow;
}
#mid {
    height: auto;
    width: 300px;
    background:green;
}
.item {
    height: 20px;
    width: 90px;
    color: red;
    float: left;
    margin-left: 2px;
    margin-top: 2px;
}
#bottom {
    width: 300px;
    height: 1px;
    background: yellow;
}
.cf:after{
    content: "";
    display: table;
    clear: both;
}