JSFiddle - React, Tailwind, and code Playground
by Pritam Bohra
HTML
<html>
<body>
<div class="container">
<div class="header"></div>
<div class="side-nav"></div>
<div class="main-content"></div>
<div class="footer"></div>
</div>
</body>
</html>
CSS
* {
box-sizing: border-box;
}
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.container {
position: relative;
height: 100%;
}
.header {
background-color: skyblue;
height: 10%;
}
.footer {
background-color: goldenrod;
/* position: absolute; */
/* bottom: 0; */
height: 5%;
z-index: 10000;
}
.main-content {
background-color: grey;
width: 75%;
padding-bottom: 20px;
height: 85%;
float: left;
}
.side-nav {
background-color: #ff0000;
width: 25%;
height: 85%;
float: left;
}
.side-nav::after {
content: "";
clear: both;
display: table;
}