Jump to content

footer


kbohme

Recommended Posts

hey,

pulling my hair out trying to get the footer to stick to the bottom of the page when there is little content, and stay at the bottom of the content when there is lots....

I have pretty much modified the crystalsidebar template so am using the same CSS and div names....

I have tried every option that I could find on websites, but to no avail.

any help would be greatly appreciated....

I am so fed up with it, i almost took my stapler to the screen  :P to make it stay put !

Link to comment
Share on other sites

th_screencap.jpg

there's a screeny.

When I leave the template as is, i get that when there is little content. Notice how the footer div box has floated up to cover the nav. If there is lots of content then its not a problem, the footer just sets itself where it should at the bottom of the content.

If I fix the footer div box at the bottom of the window then when there is alot of content it covers up the content ( by sitting at the bottom of the window ).

I was just thinking.....could I add a div box to my pages that would force the footer below it ?

Unfortunately, I knew nothing about CSS or div's before I started this thing...although I have learned alot, I still have much to go.

Again, this is just a revamp of the crystalsidebar template that comes default with the phpvms system ( if you needed to see the way that the divs are setup. )

Presently for the content I am using only tables to get it where I want it....

I have done much research on the matter, and have found a few options using div boxes with negative margins....and have tried them, but to no avail. Perhaps I am putting them in the wrong spots.. I have not yet been able to fully understand the way that this template has been setup in terms of which divs mean what.

any help would be GREATLY appreciated.

as a review...I am looking for a way to force the footer div to sit at the bottom of the window...UNLESS there is alot of content. Then it would sit at the bottom of the content.

Link to comment
Share on other sites

For some templates you may have to change the code when it comes to the pirep pages because it stops the content if there are no pireps.  You need to change it to this if there are problems.

<?php if(!$pireps) { $pireps=array(); } ?>
<?php
foreach($pireps as $report)
{
?>

Did you try adding another

</div>

tag to the log in page?? Make extra sure your footer code is correct...

Link to comment
Share on other sites

ok.....

finally got it.

by adding to the css:

html, body  {

    height 100%

}

then adding:

position: relative;

min-height: 100%;

height: 100%;

height: auto

to the #body

padding: 0 0 198px 0;

to the #innerwrapper

and

position: absolute;

bottom: 0;

bottom: -1px;

to the #footer.

for anyone else having this problem.

now when i resize my window the footer stays at the bottom unless there is alot of content, then it stays under the content.

PHEW ! That took about two days to figure out....I know, but I am a CSS virgin  :P

found out how here :

http://qrayg.com/learn/code/footerstick/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...