JSFiddle - React, Tailwind, and code Playground
HTML
<div id="wrapper">
<div id="content"></div>
</div>
<div id="data">HEHE</div>
<div id="data-2"></div>
CSS
#wrapper{
height:100px;
width:100%;
overflow-x:auto;
}
#content{
height:100%;
width:200%;
background:linear-gradient(to right, red , yellow);
}
JavaScript
var wrapper = document.getElementById("wrapper");
var content = document.getElementById("content");
console.log(wrapper.clientHeight);
console.log(content.clientHeight);
document.getElementById("data").textContent = wrapper.clientHeight;
document.getElementById("data-2").textContent = content.clientHeight;