index.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. layout: examples
  3. title: Sticky Footer Navbar Template
  4. extra_css:
  5. - "sticky-footer-navbar.css"
  6. html_class: "h-100"
  7. body_class: "d-flex flex-column h-100"
  8. ---
  9. <header>
  10. <!-- Fixed navbar -->
  11. <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
  12. <div class="container-fluid">
  13. <a class="navbar-brand" href="#">Fixed navbar</a>
  14. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
  15. <span class="navbar-toggler-icon"></span>
  16. </button>
  17. <div class="collapse navbar-collapse" id="navbarCollapse">
  18. <ul class="navbar-nav me-auto mb-2 mb-md-0">
  19. <li class="nav-item">
  20. <a class="nav-link active" aria-current="page" href="#">Home</a>
  21. </li>
  22. <li class="nav-item">
  23. <a class="nav-link" href="#">Link</a>
  24. </li>
  25. <li class="nav-item">
  26. <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
  27. </li>
  28. </ul>
  29. <form class="d-flex">
  30. <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
  31. <button class="btn btn-outline-success" type="submit">Search</button>
  32. </form>
  33. </div>
  34. </div>
  35. </nav>
  36. </header>
  37. <!-- Begin page content -->
  38. <main class="flex-shrink-0">
  39. <div class="container">
  40. <h1 class="mt-5">Sticky footer with fixed navbar</h1>
  41. <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 &gt; .container</code>.</p>
  42. <p>Back to <a href="{{< docsref "/examples/sticky-footer" >}}">the default sticky footer</a> minus the navbar.</p>
  43. </div>
  44. </main>
  45. <footer class="footer mt-auto py-3 bg-light">
  46. <div class="container">
  47. <span class="text-muted">Place sticky footer content here.</span>
  48. </div>
  49. </footer>