"Untitled"
Bootstrap 4.1.1 Snippet by 3tatero

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark"> <a class="navbar-brand" href="#">Sidebar Nav</a> <div class="collapse navbar-collapse"> <ul class="navbar-nav mr-auto sidenav" id="navAccordion"> <li class="nav-item"> <a class="nav-link nav-link-collapse" href="#" id="hasSubItems" data-toggle="collapse" data-target="#collapseSubItems2" aria-controls="collapseSubItems2" aria-expanded="false">Modeling</a> <ul class="nav-second-level collapse" id="collapseSubItems2" data-parent="#navAccordion"> <li class="nav-item"> <a class="nav-link" href="#"> <span class="nav-link-text">Weather</span> </a> </li> <li class="nav-item"> <a class="nav-link" href="#"> <span class="nav-link-text">Marine</span> </a> </li> </ul> </li> <li class="nav-item"> <a class="nav-link" href="#">Environment</a> </li> <li class="nav-item"> <a class="nav-link nav-link-collapse" href="#" id="hasSubItems" data-toggle="collapse" data-target="#collapseSubItems4" aria-controls="collapseSubItems4" aria-expanded="false">Reports</a> <ul class="nav-second-level collapse" id="collapseSubItems4" data-parent="#navAccordion"> <li class="nav-item"> <a class="nav-link" href="#"> <span class="nav-link-text">Air Quality</span> </a> </li> <li class="nav-item"> <a class="nav-link" href="#"> <span class="nav-link-text">Seasonal</span> </a> </li> <li class="nav-item"> <a class="nav-link" href="#"> <span class="nav-link-text">Agro</span> </a> </li> </ul> </li> </ul> </div> </nav> <main class="content-wrapper"> <div class="container-fluid"> <h1>Main Content</h1> </div> </main> <footer class="footer"> <div class="container"> <div class="text-center"> <span>Coded by <a href="#">3tatero</a>, 2021</span> </div> </div> </footer>
html { position: relative; min-height: 100%; } body { padding-top: 4.5rem; margin-bottom: 4.5rem; } .footer { position: absolute; bottom: 0; width: 100%; height: 3.5rem; line-height: 3.5rem; background-color: #ccc; } .nav-link:hover { transition: all 0.4s; } .nav-link-collapse:after { float: right; content: '\f067'; font-family: 'FontAwesome'; } .nav-link-show:after { float: right; content: '\f068'; font-family: 'FontAwesome'; } .nav-item ul.nav-second-level { padding-left: 0; } .nav-item ul.nav-second-level > .nav-item { padding-left: 20px; } @media (min-width: 992px) { .sidenav { position: absolute; top: 0; left: 0; width: 230px; height: calc(100vh - 3.5rem); margin-top: 3.5rem; background: #343a40; box-sizing: border-box; border-top: 1px solid rgba(0, 0, 0, 0.3); } .navbar-expand-lg .sidenav { flex-direction: column; } .content-wrapper { margin-left: 230px; } .footer { width: calc(100% - 230px); margin-left: 230px; } }

Related: See More


Questions / Comments: