kbohme Posted March 17, 2009 Report Share Posted March 17, 2009 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 to make it stay put ! Quote Link to comment Share on other sites More sharing options...
Strider Posted March 17, 2009 Report Share Posted March 17, 2009 What is exactly happening to it? Maybe take a screenshot to show us what is happening. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
RogerB Posted March 17, 2009 Report Share Posted March 17, 2009 Check those <div> tags. Quote Link to comment Share on other sites More sharing options...
kbohme Posted March 17, 2009 Author Report Share Posted March 17, 2009 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. Quote Link to comment Share on other sites More sharing options...
RogerB Posted March 17, 2009 Report Share Posted March 17, 2009 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... Quote Link to comment Share on other sites More sharing options...
kbohme Posted March 17, 2009 Author Report Share Posted March 17, 2009 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 found out how here : http://qrayg.com/learn/code/footerstick/ Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 18, 2009 Administrators Report Share Posted March 18, 2009 Yup those little CSS niggles drive you nuts. I need to fix the docs page to do that.. lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.