I've been adding this type of code to some of the sites I've built:
http://qrayg.com/experiment/footerstick/

It makes the footer stick to the bottom of the page. I know it is a pain in the butt..

Does anyone know the best way to add this to Zen? It can make a site look a lot nicer.

Comments

Hueij’s picture

For my own site I use the technique explained at http://www.themaninblue.com/writing/perspective/2005/08/29/ . In page.tpl.php I moved #footer out of #page and put it below it, like

<div id="page">
   ...
</div>
<div id="footer">
   ...
</div>

I think with this change your method will work too, and I think that this moving of #footer should be standard in Zen.

ajudson’s picture

I've got this working using #1 method, and a couple of bits from http://www.alistapart.com/articles/footers/. In my case I'm working on a subtheme using the fixed width layout. The css changes applied are:

html,
body
{
	height: 100%;
}

#page,
#footer, /* needed to maintain width */
#closure-blocks
{
   margin-left: auto;
   margin-right: auto;
   width: 960px;        
}

#page  
{
	min-height: 100%; /* needed to force footer down to bottom with long page */
	padding-bottom: 25px; 	/* my footer is a fixed height because of image, but probably should use ems */
}

#footer
{
	height: 25px;  /* enough space for the background image, but probably should use ems */
	margin-top: -25px;
}
photocurio’s picture

Hi ajudson, I finally noticed your post. I made the changes you suggested, but my layout didn't budge. Did you have to override core drupal settings?

photocurio’s picture

got it to work.. footer requires absolute positioning.

vm’s picture

did you clear your cache tables in administer -> performance after altering the css file?

akalata’s picture

Status: Active » Closed (fixed)