2018-11-05 12:24:55 +01:00
---
layout: examples
title: Sticky Footer Navbar Template
2019-01-08 17:33:28 +01:00
extra_css:
- "sticky-footer-navbar.css"
2018-11-05 12:24:55 +01:00
html_class: "h-100"
body_class: "d-flex flex-column h-100"
---
< header >
<!-- Fixed navbar -->
< nav class = "navbar navbar-expand-md navbar-dark fixed-top bg-dark" >
2019-12-25 17:16:15 +01:00
< div class = "container-fluid" >
< a class = "navbar-brand" href = "#" > Fixed navbar< / a >
2020-07-22 21:33:11 +02:00
< button class = "navbar-toggler" type = "button" data-bs-toggle = "collapse" data-bs-target = "#navbarCollapse" aria-controls = "navbarCollapse" aria-expanded = "false" aria-label = "Toggle navigation" >
2019-12-25 17:16:15 +01:00
< span class = "navbar-toggler-icon" > < / span >
< / button >
< div class = "collapse navbar-collapse" id = "navbarCollapse" >
2020-06-09 15:44:20 +02:00
< ul class = "navbar-nav me-auto mb-2 mb-md-0" >
2021-01-08 19:53:04 +01:00
< li class = "nav-item" >
< a class = "nav-link active" aria-current = "page" href = "#" > Home< / a >
2019-12-25 17:16:15 +01:00
< / li >
< li class = "nav-item" >
< a class = "nav-link" href = "#" > Link< / a >
< / li >
< li class = "nav-item" >
2021-09-06 21:14:21 +02:00
< a class = "nav-link disabled" > Disabled< / a >
2019-12-25 17:16:15 +01:00
< / li >
< / ul >
2019-09-28 16:16:03 +02:00
< form class = "d-flex" >
2020-06-09 15:44:20 +02:00
< input class = "form-control me-2" type = "search" placeholder = "Search" aria-label = "Search" >
2019-09-28 16:16:03 +02:00
< button class = "btn btn-outline-success" type = "submit" > Search< / button >
2019-12-25 17:16:15 +01:00
< / form >
< / div >
2018-11-05 12:24:55 +01:00
< / div >
< / nav >
< / header >
<!-- Begin page content -->
2020-03-09 14:37:46 +01:00
< main class = "flex-shrink-0" >
2018-11-05 12:24:55 +01:00
< div class = "container" >
< h1 class = "mt-5" > Sticky footer with fixed navbar< / h1 >
2019-05-15 17:48:14 +02:00
< p class = "lead" > Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with < code class = "small" > padding-top: 60px;< / code > on the < code class = "small" > main > .container< / code > .< / p >
2019-02-04 11:22:02 +01:00
< p > Back to < a href = "{{< docsref " / examples / sticky-footer " > }}">the default sticky footer< / a > minus the navbar.< / p >
2018-11-05 12:24:55 +01:00
< / div >
< / main >
2019-05-15 10:51:45 +02:00
< footer class = "footer mt-auto py-3 bg-light" >
2019-05-15 17:48:27 +02:00
< div class = "container" >
2018-11-05 12:24:55 +01:00
< span class = "text-muted" > Place sticky footer content here.< / span >
< / div >
< / footer >