Keeping footer at the bottom of the page.
-
How can I make sure a footer stays all the way down at the bottom of a page? If you see this page http://invictatrader.com/bbpress/forum/trading-futures-and-forex-with-the-watts-system the footer is kind of halfway in the page leaving more space below it. Is it possible to push it down so it stays all the way at the bottom of a page?
Thank you.
-
The bottom of the browser window you mean? It already is at the bottom.
This will be less of an issue once you have some topics and content. It will end up being much longer. If you want to ensure it’s always so far down (and you have to decide what ‘so far’ is, depending on what size monitor someone visits the site with) then you need to give the div a min-height and put the footer at the bottom of that. But I think it will be fine once you have some forums and topics and posts. Your footer will always be down so far you’ll have to scroll down to it (depending on your monitor resolution, I suppose.)
Thanks. And just in case if some pages are short, how do I give the div a min-height? How much and which div?
Thanks a lot.
I made a div called “min-height” in the footer.php file and set it to “px” in the CSS stylesheet. With “px” it goes to the bottom of this example page http://invictatrader.com/bbpress/forum/why-watts-trading-system in Firefox but it still hangs in IE. Is there a way to set the “min-height” in the Stylesheet to something other than “px” so that the footer will always hug the bottom of the page? I tried “auto” and “%” but they did not work. Doing this pushes it down on all pages, which is not needed on all my pages as some are long enough to push the footer to the bottom.
Thank you.
Without using JavaScript, there is no way that I know of to know the size of the browser viewport. If you used JavaScript to determine the size, then you could create a size for the div that put your footer to the bottom.
IE has a problem with min-height sometimes.
http://www.google.com/search?q=ie+min-height+hack
I think in general though, you want to set the height of an existing div with min-height. That way, if there’s less content, it uses the minimum height. If there is enough content, the min-height from the CSS is used instead.
Thanks.
- You must be logged in to reply to this topic.