JSFiddle - React, Tailwind, and code Playground

HTML

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<body onresize="getHeight()" onload="getHeight()">


  <div id="someDiv">

  </div>
  <h3 id="height">

</h3>
  <h3 id="width">

</h3>
  <script>
    function getHeight() {
      var w = document.getElementById("someDiv").offsetWidth;
      var h = window.innerHeight;
      document.getElementById("height").innerHTML = "The height of the window is:" + h;
      document.getElementById("width").innerHTML = "The width of the div is:" + w;

    }

  </script>
</body>

CSS

#someDiv {
  width: calc(100vh*0.1);
  height: 200px;
  background-color: blue;
}