JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
    <div class="c1">Content 1</div>
    <div class="c2">Content 2</div>
    <div class="bg">Background</div>
</div>

CSS

div.container {
    display: flex;
    flex-direction: row;

    width: 100%; height: 300px;
    justify-content: space-between;
    width: 100%;
    outline: 1px solid;
}

div.c1 {
    background: #aaeecc;
    width: 100px;
    position: relative;
    z-index: 50; top: 20px;
    display: flex;
    flex: 1; /* added flex property */
}

div.c2 {
    background: #cceeaa;
    width: 200px;
    position: relative;
    z-index: 50; top: 20px;
    display: flex;
}


div.bg {
    background: #ccc;
    width: 100%;
    height: 100%;
    z-index: 0;
    left: 0px; top: 0px;
    position: absolute;
    display: flex;
}