18 comments

[ 4.3 ms ] story [ 98.4 ms ] thread
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.
And it validates!
Indeed; but there is the general caveat that you can only use padding to space elements and not margin, which is a bit clunky.
It isn't working on IE8.
It worked in IE8 for me.

What exactly goes wrong in IE8 for you?

Seems to need a horizonal resize to take effect. Just resizing vertically doesn't do anything.
That's unfortunate.

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

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.

(comment deleted)
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.
It's cool, but why not just stick a minimum height in your content div?
That wouldn't work very well because it may add scrolling to your page when it isn't necessary.
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>
(comment deleted)