Blake wrote:

> Apparently my footer isn't sticking to the bottom of my web page. I 
> have an old 15" monitor on 1024x768, so I can't see this problem. But
>  I'm told it exists on 1280x960 monitors.
> 
> <http://www.svitavice.cz/test/en/>.
> 
> I'm using the following CSS and I think it should be sticking the 
> footer to the bottom of the page at any resolution.
> 
> [...]

No, it won't.
IE6 doesn't understand 'min-height', and those browsers that do can't
really calculate nested 'min-height: 100%;' to mean the same on the
child as on the parent. Thus, the child lose its 'height'.


You have this...
<http://www.themaninblue.com/experiment/footerStickAlt/>
...which does work the way you want.


Alternatively you have the 'absolute positioned footer', that in your
case I would style (from memory) as...

html, body {
        height: 100%;
}

#container {
        width: 710px;
        min-height: 100%;
        margin: 0 auto;
        position: relative;
}

* html #container {
        height: 100%;
}

#inner-container {
        padding-bottom: 6em /* a value equal to or taller than the footer -
whatever that is */;
}

#footer {
        position: absolute;
        bottom: 0;
        left: 0;
        padding: 30px 20px;
        width: 670px;
}

You'll see that the footer is positioned at the bottom of the
parent-container (#container) - which is at least 100% tall. Thus
perfect alignment there. The child-container (#inner-container) then has
to push the parent-container taller when content is added, and the
padding-bottom is there to make sure the footer won't overlap any
content in the child-container.


Both alternatives are suffering from problems related to how tall the
footer really is when some font-resizing is applied in browsers. Thus, I
regard both "footer-stick" solutions as pretty weak - but conditionally
working - solutions.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to