0

I use the following code to create a footer using Bootstrap:

<nav class="navbar navbar-default navbar-fixed-bottom">
    <div class="container">
        <div class="navbar-header">
            <span class="navbar-brand">Ok Bye</span>
        </div>

        <p class="navbar-text navbar-right">company &copy; 2017</p>
    </div>
</nav>

I want a static footer at the bottom of the page, not one that is visible all the time in the viewport. What is the Bootstrap way to achieve this?

raul
  • 1,209
  • 7
  • 20
  • 36
  • I think you are missing something. nav is used for navigation not for footer. Please correct your code properly. this might can help: http://getbootstrap.com/examples/sticky-footer/ – Nimmi Mar 27 '17 at 20:40

1 Answers1

2

The static footer has an implementation in Bootstrap. You don't need to use <nav>

CSS:

/* Sticky footer styles
-------------------------------------------------- */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 60px;
  background-color: #f5f5f5;
}

HTML:

<footer class="footer">
  <div class="container">
    ...
  </div>
</footer>
Yash Gupta
  • 73
  • 8