News for hackers. Stuff that matters.
Re:The CSS Sticky Footer by terryjsmith on Saturday April 10, 2010 @09:07AM (#1254970)
Same technique, tested in IE6 to IE8, FF, Chrome, Safari and Opera; no conditionals:

    html, body, #canvas { height: 100%; }

    body > #canvas {
        height: auto; 
        min-height: 100%;
    }

    #canvas {
        width: 100%;
        position: absolute;
    }

    #footer {
        position: absolute;
        bottom: 0;
    }
HTML:

    <body>
        <div id="canvas">
            <!-- all of your other code -->
            <div id="footer"></div>
        </div>
    </body>
[deleted]
Re:The CSS Sticky Footer by terryjsmith on Saturday April 10, 2010 @10:58AM (#1255120)
Updated, thank you.
Re:The CSS Sticky Footer by voidpointer on Saturday April 10, 2010 @04:27AM (#1254762)
This is a good example of what is still utterly wrong today with HTML/CSS implementations. I appreciate the work and the fact that it is shared with the public. The fact that you still have to deal with this sort of markup in 2010 is really sad.
Re:The CSS Sticky Footer by mtarnovan on Saturday April 10, 2010 @07:14AM (#1254851)
Or just use Compass with Blueprint http://wiki.github.com/chriseppstein/compass/ and it's one line of code from there:

+sticky-footer(200px)

Re:The CSS Sticky Footer by jackowayed on Saturday April 10, 2010 @12:01AM (#1254538)
That's cool. I think the most surprising part, upon reading the CSS, is that the only special fixes are for Opera and IE8. So IE7 and IE6 just work.
Re:The CSS Sticky Footer by ErrantX on Saturday April 10, 2010 @09:40AM (#1255010)
Indeed; but there is the general caveat that you can only use padding to space elements and not margin, which is a bit clunky.
Re:The CSS Sticky Footer by eam on Saturday April 10, 2010 @12:59AM (#1254587)
And it validates!
Re:The CSS Sticky Footer by braksandwich on Saturday April 10, 2010 @03:37AM (#1254725)
I love this technique, though its been around for a while.

This is where I first saw it: http://www.themaninblue.com/writing/perspective/2005/08/29/

Re:The CSS Sticky Footer by ck2 on Saturday April 10, 2010 @02:29AM (#1254654)
Do y'all really care for this on websites you use?

It drives me crazy when I am scrolling a large page if there is nothing useful down there, and I immediately adblock it.

Re:The CSS Sticky Footer by wrinklz on Saturday April 10, 2010 @05:44AM (#1254813)
It's cool, but why not just stick a minimum height in your content div?
Re:The CSS Sticky Footer by Pheter on Saturday April 10, 2010 @07:12AM (#1254850)
That wouldn't work very well because it may add scrolling to your page when it isn't necessary.
Re:The CSS Sticky Footer by csmeder on Saturday April 10, 2010 @12:54AM (#1254579)
Thank you!
Re:The CSS Sticky Footer by briansmith on Saturday April 10, 2010 @01:29AM (#1254614)
It isn't working on IE8.
Re:The CSS Sticky Footer by RevRal on Saturday April 10, 2010 @02:01AM (#1254634)
It worked in IE8 for me.

What exactly goes wrong in IE8 for you?

Re:The CSS Sticky Footer by MichaelGG on Saturday April 10, 2010 @02:21AM (#1254648)
Seems to need a horizonal resize to take effect. Just resizing vertically doesn't do anything.
Re:The CSS Sticky Footer by RevRal on Saturday April 10, 2010 @02:48AM (#1254669)
That's unfortunate.

I tested this in IE8 by zooming out. Didn't expect a problem since that worked.