Skip to content

Commit

Permalink
Factored out sticky footer into a separate file and removed it from t…
Browse files Browse the repository at this point in the history
…he site. This fixes the horizontal scrolling problem, although the footer no longer sticks to the bottom on short pages.
  • Loading branch information
audreyfeldroy committed Jan 27, 2011
1 parent 6b7db69 commit 807f817
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 26 deletions.
26 changes: 3 additions & 23 deletions media/css/djangopackages.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,9 @@ h2 { font-size: 153.9%; }
#tabhead .login a, #tabhead .login a:visited { color: #333; }
#tabhead .login a:hover { color: #DEF; }

#footer { width: 100%; text-align: center; font-size:80%; }

/* Sticky footer from http://www.cssstickyfooter.com/
(still overriding base.css) */
/* must declare 0 margins on everything, also for main layout components use padding, not
vertical margins (top and bottom) to add spacing, else those margins get added to total height
and your footer gets pushed down a bit more, creating vertical scroll bars in the browser */
html, body {height: 100%;}
#wrap {min-height: 100%;}
#main {overflow:auto;
padding-bottom: 50px;} /* must be same height as the footer */
#footer {position: relative;
margin-top: -50px; /* negative value of footer height */
height: 50px;
clear:both;}
/*Opera Fix*/
body:before {/* thanks to Maleika (Kohoutec)*/
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px;/* thank you Erik J - negate effect of float*/
}
#footer { margin-top:20px; clear:both; width: 100%; text-align: center; font-size:80%; }




/* Nav bar - overrides styles from tabs.css */
Expand Down
4 changes: 2 additions & 2 deletions media/css/home.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/* left and right columns */
#home-leftcol { float: left; width:45%; }
#home-rightcol { float: right; width:45%; }
#home-leftcol { float: left; width:50%; }
#home-rightcol { float: right; width:50%; }

.home-borderlessbox { padding-top:30px; }

Expand Down
26 changes: 26 additions & 0 deletions media/css/sticky-footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* This file contains the old sticky footer code that was causing the horizontal scroll bar
problem. It has been separated out into this file from djangopackages.css. Currently, this
file is not being used by the site. In the future, it may be integrated back in or deleted
entirely. */

/* Sticky footer from http://www.cssstickyfooter.com/
(still overriding base.css) */
/* must declare 0 margins on everything, also for main layout components use padding, not
vertical margins (top and bottom) to add spacing, else those margins get added to total height
and your footer gets pushed down a bit more, creating vertical scroll bars in the browser */
html, body {height: 100%;}
#wrap {min-height: 100%;}
#main {overflow:auto;
padding-bottom: 50px;} /* must be same height as the footer */
#footer {position: relative;
margin-top: -50px; /* negative value of footer height */
height: 50px;
clear:both;}
/*Opera Fix*/
body:before {/* thanks to Maleika (Kohoutec)*/
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px;/* thank you Erik J - negate effect of float*/
}
3 changes: 2 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
{% endblock %}
</div>
</div>
<div class="clear"></div>
<div id="footer">
<div class="legal">
<hr /><br/>
Expand All @@ -124,7 +125,7 @@
- <a href="/api/v1/docs/">API</a>
- <a href="/help/syndication/">RSS / Atom</a>
<br />
{% trans "Powered by" %} <a href="http://www.djangoproject.com/">Django</a>, <a href="http://www.pinaxproject.com/">Pinax</a> and <a href="/grids/g/this-site/">these fine packages</a>.
{% trans "Hosted by" %} <a href="http://www.cartwheelweb.com/">Cartwheel, LLC</a>. {% trans "Powered by" %} <a href="http://www.djangoproject.com/">Django</a>, <a href="http://www.pinaxproject.com/">Pinax</a> and <a href="/grids/g/this-site/">these fine packages</a>.
</div>
</div>

Expand Down

0 comments on commit 807f817

Please sign in to comment.