Previous Message
Next Message

footerStickAlt

Sent by Nick Fitzsimons on 17 March 2006 13:01


> But if you try that alone it doesn't position the footer, it also requires
> CSS from the imported main.css
>
> Tim
>

I added a height: 7.5em to the rule for #footer, and put in my usual

* {
   margin: 0;
   padding: 0;
}

at the top and had a page with a fixed footer. Adding a load of text
showed that it scrolled correctly.

Mind, I only tested in Firefox 1.5 - things are a bit busy here as we
launch 37 sites simultaneously on Monday morning :-)

FYI, my copy of the code (with some background-colors to show what's
where) was:

[maninblue.html]
<html>
<head>
<link type="text/css" rel="stylesheet" href="maninblue.css">
<body>
<div id="nonFooter">
<p>non footer</p>
</div>
<div id="footer">
<p>footer</p>
</div>
</body>
</html>

[maninblue.css]
* {
    margin: 0;
    padding: 0;
}

html
{
height: 100%;
}

body
{
height: 100%;
background-color: #ccc;
}

#nonFooter
{
position: relative;
min-height: 100%;
background-color: #060;
}

* html #nonFooter
{
height: 100%;
}

#footer
{
position: relative;
margin-top: -7.5em;
background-color: #600;
height: 7.5em;
}

HTH,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- 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/
Previous Message
Next Message

Message thread: