PDA

View Full Version : How To Create an Image Footer


rph105
11-24-2007, 09:41 PM
how can i create a footer at the bottom of my page, that stays at the bottom no matter how long my page is, i want to use an image for the footer aswell, so it repeats in grey (the site is black btw), how can i pull this off.

any input is appreciated

thanks

Cary
11-25-2007, 01:03 AM
I don't know if this is compatible with IE 7, but this is the method I came across. It requires all of your page content to be in a div with the ID of "wrapper", except for the footer div, which comes after the wrapper div.

Put this above your doctype:
<!-- force IE into Quirks Mode -->

Place this conditional code in the head of your html after your style sheet link:
<!--[if IE]>
<style type="text/css">
body {
overflow-y: hidden;
}
div#wrapper {
height: 100%;
overflow: auto;
}
</style>
<![endif]-->

Place this in your stylesheet:

body {
margin: 0;
padding-bottom: whatever-your-footer-height-is;
}
#footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: whatever-your-footer-height-is;
}
html > body #footer {
position: fixed;
}

neonfluxx
11-25-2007, 01:28 AM
dude just do 100% height in css and subtract a footer size from the bottom. Bang your done

Cary
11-25-2007, 02:05 AM
Make what 100% height?

Cary
11-25-2007, 02:26 AM
Here's another method in case the method above doesn't work in IE7.

http://www.sitepoint.com/forums/showpost.php?p=1239966&postcount=3

rph105
11-25-2007, 02:38 AM
dude just do 100% height in css and subtract a footer size from the bottom. Bang your done

how do i do that, can u give me a brief tutorial on how to do this?

neonfluxx
11-25-2007, 04:45 AM
take a look at this!!! this is wnat you want to do right? I don't have time for tutorials right now.

http://www.productionjunky.com/test/