JSFiddle - React, Tailwind, and code Playground

HTML

<div id="wrap">
    <div id="el">
        dsadsa<br/>
        d<br/>
        asf<br/>
        dsf<br/>
        ds<br/>
        fdsf
    </div>
</div>

<p id="log"></p>

CSS

#wrap {
    width: 50%;
}

#el {
    background: red;
}

#log {
    position: fixed;
    bottom: 0;
    width: 100%;
    min-height: 30px;
    background: #444;
    color: #fff;
    font: helvetica, arial;
}

JavaScript

var log = document.getElementById('log'),
    el = document.getElementById('el'),
    height = el.getComputedStyle('height'),
    width = el.getComputedStyle('width');

log.innerText = 'height: ' + height + ', width: ' + width ;