JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<div id="container" class="some-class"></div>

CSS

.some-class {
  border: 1px solid;
  width: 500px;
  height: 100px;
  padding: 10px;
}

JavaScript

var offsetHeight = document.getElementById('container').offsetHeight;
alert(offsetHeight);