JSFiddle - React, Tailwind, and code Playground
HTML
<div id="head">
<div id="div1">див 1</div>
<div id="div2">див 2</div>
</div>
CSS
#head {
background: yellow;
width: 550px;
overflow: auto;
}
#div1 {
background: red;
height: 150px;
width: 150px;
float: left;
}
#div2 {
background: green;
height: 150px;
width: 150px;
float: right;
}