Browse Source

Fixes the footer.

I got this solution from http://stackoverflow.com/a/10099486/177116

Twitter bootstrap class `navbar navbar-fixed-bottom` is not the solution because then the footer overlaps all the stuff.
Talha Mansoor 12 years ago
parent
commit
8a5bb8efe9
3 changed files with 14 additions and 3 deletions
  1. 11 2
      static/css/style.css
  2. 2 0
      templates/base.html
  3. 1 1
      templates/footer.html

+ 11 - 2
static/css/style.css

@@ -1,12 +1,21 @@
+body,html{
+    height:100%;
+}
+
+#content-sans-footer{
+    min-height:100%;
+}
+
 /* site title */
 
 .site-name {
-font-family: "Monaco","Inconsolata","Andale Mono","Lucida Console","Bitstream Vera Sans Mono","Courier New",Courier,monospace;
+    font-family: "Monaco","Inconsolata","Andale Mono","Lucida Console","Bitstream Vera Sans Mono","Courier New",Courier,monospace;
 }
+
 /* footer */
 
 div#footer {
-    margin:0px;
+    margin:15px 0px;
     border-top:1px solid rgba(0,0,0,0.2);
     padding:2px 5px 0px 5px;
     font-size:0.7em;

+ 2 - 0
templates/base.html

@@ -12,6 +12,7 @@
         {% endblock %}
     </head>
     <body>
+        <div id="content-sans-footer">
         <div class="navbar navbar-static-top">
             <div class="navbar-inner">
                 <div class="container">
@@ -48,6 +49,7 @@
                 <div class="span1"></div>
             </div>
         </div>
+    </div>
         {% include 'footer.html' %}
         {% block script %}
         {% include 'analytics.html' %}

+ 1 - 1
templates/footer.html

@@ -1,5 +1,5 @@
 <footer>
-<div class="navbar navbar-fixed-bottom" id="footer">
+<div id="footer">
     <ul class="footer-content">
         {% if SITESUBTITLE %}
         <li class="elegant-subtitle"><span class="site-name">{{ SITENAME }}</span> - {{ SITESUBTITLE }}</li>