<script>
  var div = <div style="position: relative; width:calc(100% - 100px); height:100px; background: gray"></div>
  
  
  
  
  div
  
</script>