JSFiddle - React, Tailwind, and code Playground

by orlenko

HTML

<div id="content">
    <iframe src="http://www.microsoft.com" name="frame2" id="frame2" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto" onload="" allowtransparency="false"></iframe>
</div>
<div id="block"></div>
<div id="header"></div>
<div id="footer"></div>

CSS

body {
    margin: 0px;
    padding-top: 78px;
    padding-right: 0px;
    padding-bottom: 25px;
    padding-left: 0px;
    min-height: 0px;
    height: auto;
    text-align: center;
    background-color: lightblue;
    overflow:hidden;
}

div#header {
    top: 0px;
    left: 0px;
    width: 100%;
    height: 85px;
    min-width: 1000px;
    overflow: hidden;
    background-color: darkblue;
}

div#footer {
    bottom: 0px;
    left: 0px;
    width: 100%;
    height: 25px;
    min-width: 1000px;
    background-color: darkblue;
}

/** START CHANGES **/
div#content {
    position: fixed;
    top: 80px;
    left: 40px;
    bottom: 25px;
    min-width: 200px;
    width: 40%;
    background: black;
}

div#content iframe {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
}
/** END CHANGES **/

div#block {
    
    background-color: lightgreen;
    margin: 40px;
    position: fixed;
    top: 80px;
    left: 50%;
    width: 200px;
    bottom: 25px;
    min-width: 200px;

    
}



@media screen {
body > div#header {
    position: fixed;
}
body > div#footer {
    position: fixed;
}
}