JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test">
<div id="test2">
this is<br/>
just some<br/>
test text<br/>
to test<br/>
the height<br/>
of each <br/>
div<br/>
</div>
</div>
CSS
#test {
border: 1px solid red;
overflow: hidden;
}
#test2 {
height: auto;
width: 200px;
float: right;
border: 1px solid blue;
}