Bootstrap logo

Simple Sticky Footer In Bootstrap

Posted by Weston Ganger on September 29, 2016

Creating a sticky footer can be a real pain. Heres a simple way to do so in bootstrap.

HTML:


<html>
  <body>
    <div class="container-fluid">
      <!-- page content -->
    </div>
 
    <footer class="footer">
    </footer>
  <=</body>
</html>


CSS:


html {
  position: relative;
  min-height: 100%;
}
body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  /* Set the fixed height of the footer here */
  height: 60px;
  width: 100%;
  background-color: #CCC;


Related External Links:


Posted in HTML / CSS and Tagged with bootstrap sticky-footer 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts