JSFiddle - React, Tailwind, and code Playground

by arcm111

HTML

<div id="wrapper">
    <div id="content">
        <input type="button" value="activate" onclick="activate()" />
    </div>
</div>

CSS

#content {
    width: 100%;
    background: grey;
    height: 200px;
}
#wrapper {
    width: 100%;
}

JavaScript

function activate() {
    var elm = document.getElementById("content");
    var h = window.innerHeight;
    var content = elm.style.height;
    var fix = h - content;
    elm.style.height += fix + 'px';
    alert(elm.style.height);
}