Ark Development Open Source Standards
latest
  • Introduction
  • Zen Coding and Netbeans Templates
  • Git Tips and Tricks
  • Linux System Administration
  • Drupal Gotcha
  • Front-end Patterns
    • Sticky Footer
      • Problem Statement
      • Sample CSS
      • Common Issues
      • Resources
    • Banner Patterns
  • Drupal 8 Reference
Ark Development Open Source Standards
  • Docs »
  • Front-end Patterns »
  • Sticky Footer
  • Edit on GitHub

Sticky Footer¶

Problem Statement¶

How to pin footer to be fixed to bottom of browser window without min-height for content cell

Sample CSS¶

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

Common Issues¶

  • Footer must be absolute from <html>. Avode any parents to .footer with position relative.
  • If you don’t need to put a fixed height to your footer, you need to change “margin-bottom” at the body in the different media queries in your css

Resources¶

https://getbootstrap.com/examples/sticky-footer/

Next Previous

© Copyright 2016, Ark Development Open Source Ninjas. Revision 618f2b61.

Built with Sphinx using a theme provided by Read the Docs.