views:

114

answers:

3

I have a fixed-width DIV that I want to remain at the bottom of the browser's viewport.

Unfortunately, I haven't a clue where I would even begin to try to implement this.

Obviously the first thing to do is set position to fixed. But beyond that... no clue.

+4  A: 

Take a look here.

Oren
hehe good answer, maybe a bit too short ;-)
garph0
@Oren though CSS Sticky Footer is an amazing work by the way the question was written I thing George wants the footer to overlap the content like the facebook bottom bar.
Frankie
@garph0 - I was going to paste in the CSS, but I figured it wouldn't be nice to take without giving attribution to the original author and I didn't want to paste in a wall of text.
Oren
@Frankie - I see no indication that is the case. I guess will have to wait for the original poster to clarify if this is what he wants.
Oren
@Oren: Sorry guys. Ya, I was hoping for it to overlap when applicable.
George Edison
+3  A: 
#mydiv{
   position: fixed;
   bottom: 0px;
}
toby
You should look through the link I posted instead. There are fixes needed for IE and Opera.
Oren
+1  A: 

See at css-tricks:

Fixed Footer

CSS:

#footer {
   position:fixed;
   left:0px;
   bottom:0px;
   height:30px;
   width:100%;
   background:#999;
}

/* IE 6 */
* html #footer {
   position:absolute;
   top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');
}
Sarfraz