I want to align the div at the bottom of the page, not at the bottom of the screen. When I do this:
#contact-block{ position: absolute; bottom: 0; left: 0; }
div is placed at the bottom of the screen. When my page is long, I need to scroll down, and the div, which was supposed to be at the bottom, floats somewhere in the middle.
It may be a simple solution, but I just do not see it.
Here is my HTML:
<div id="left"> <div id="submenu"> <span class="menutitle">Services</span> <ul> </ul> </div> <div id="contact-block"> <span class="contacttitle">Contact</span></div> </div> <div id="content"> </div>
I also added a small image to illustrate what I mean: 
The red div is a pin div.
Edit: I found a solution with jQuery and CSS. It may not be the best solution, but hey, it works.
JQuery
var offset= $(document).height()-$("#contact-block").height()- $("#footer").height()-60; $("#contact-block").css("top", offset); $("#contact-block").css("left", $("#wrapper").position().left);
CSS
#contact-block { position : absolute; width:216px; height:100px; background:url(../img/contact-bg.jpg) repeat-x #5c5c5c; }
samn
source share