Forum Moderators: not2easy

Message Too Old, No Replies

CSS Vertical Alignment

Forcing a <DIV> to the bottom of a window

         

InsaneAmoeba

9:45 pm on Aug 6, 2004 (gmt 0)



I am somewhat new to stylesheets, and I'm having a problem making one of my <DIV> tags lay properly on the screen.

I'd like to make it so that the <DIV> would align itself with the bottom of the browser window, no matter what the size. Is it possible to do this with stylesheets?

Birdman

9:49 pm on Aug 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could use absolute positioning, but if the content of the page exceeds the first view(ie. scrolling window), there will be overlap.

Or there is fixed positioning, which is not going to work correctly in older browsers.

Absolute:
#bot_div{
position: absolute;
left: 0px;
bottom: 0px;
}
Fixed:
#bot_div{
position: fixed;
left: 0px;
bottom: 0px;
}

Usage:
<div id="bot_div">

Lance

10:18 pm on Aug 6, 2004 (gmt 0)

10+ Year Member



Check out this thread [webmasterworld.com].