PDA

View Full Version : Align footer at very bottom?


sebaot
07-15-2009, 10:43 PM
There's a problem with the vbulletin, and you can see it on this site if you click "chat". I've got the same problem. I've got a similar layout with a background that has a white blank space in the middle. The footer will align at the very bottom on pages where you have to scroll down.

However, when a page covers just half the screen, the footer comes up there halfway down the screen. Not at bottom. I tried setting min-height to 100% and using position absolute and bottom 0 to work around this. Unfortunately, when I opened a page that had to scroll, the footer was of course on top of the content but bottom of browser window.

Is there a way to solve this or am I better off forgetting about it? :-)

Freesteyelz
07-15-2009, 11:20 PM
You can use the position:fixed to bottom:0 BUT because this particular attribute relies on your browser screen, if you have a page where the content exceeds the screen then your text or image (that's using the fixed value) will overlap with the other content that's shown at the bottom of the browser screen (when the scrollbar is at the top). The absolute value wouldn't resolve that issue either. If that doesn't bother you then you can apply either (1 or 2):

1) Add to the bottom of the footer codes (or at the minimum after $ad_location[ad_footer_end])


<div style="position:fixed;bottom:0;left:50%;">Testing</div>


2) Or if you prefer using CSS then add in headerinclude template:


<style type="text/css">
.bottomcontent {
position:fixed;
bottom:0;
left:50%;
}
</style>



Then add to the bottom of the footer codes (or at the minimum after $ad_location[ad_footer_end])


<div class="bottomcontent">Testing</div>

sebaot
07-20-2009, 10:58 PM
It looks like yet another caveat I'm going to have to live with. Thanks for the input, it's good to know it's not worth putting more effort into trying to get it worked out. :-)

Freesteyelz
07-21-2009, 04:48 AM
I used to have this issue with signatures. That was easier to manage since I was working within a container rather than a browser.