JSFiddle - React, Tailwind, and code Playground
HTML
<header id="header"> <span>Headear says</span> </header>
<div class="ScrollableWrapper">
<span>Hello . <br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>..<br/>.<br/>End of content</span>
</div>
<div id="foooter"> <span>My Footer</span></div>
CSS
/*########### SCROLLING HANDLING ###########*/
html {
overflow: hidden;
height: 100%;
}
body {
box-sizing: border-box;
overflow: hidden;
height: 100%;
}
header,footer {
overflow: hidden;
}
.ScrollableWrapper {
overflow: scroll;
-webkit-overflow-scrolling: touch; /*to make it smooth as native*/
}
/*########### CUSTOM STYLE ###########*/
header {
background-color: #008bd2;
color: white;
text-align: center;
padding-top: 0px;
margin: 0px;
position: fixed;
z-index: 1000;
top: 0px;
left: 0px;
width: 100%;
max-height: 45px !important;
height: 45px !important;
line-height: 45px;
}
.ScrollableWrapper {
top: 45px;
left:0;
right:0;
bottom:0;
position:absolute;
margin-bottom:15px;
}
#foooter {
position: fixed;
bottom:0px;
z-index: 1;
overflow: auto;
background-color: #c9c9c9;
width:100%;
height:15px;
}
body {
margin: 0px;
padding: 0px;
}