The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 4 of 4

Thread: Dynamic Footer Position and Long Content Help??

  1. #1

    Dynamic Footer Position and Long Content Help??

    Hey all,

    I'm developing a website currently and I am having a bit of a problem with my footer position in regards to the content position.

    I basically want my footer to stick to the bottom of the view port if the content is shorter than it. Otherwise if my content is longer than the viewport I would like the footer to sit at the bottom of that.

    I have tried footer stick alt and cannot seem to get that working (might give that another go when I have the patience with it again.)

    So what I am wondering is if it is possible to detect the height "dynamically" of the content area (div) and place my footer accordingly.

    At the moment I am doing a kind of work around which does not work 100% on large 22" plus monitors (works great on my laptop). Basically what I am doing is I have a variable $contentLength = '1'; and I am saying


    PHP Code:
    if ($contentLength == "1") {
    echo 
    '<div style="clear: both;">&nbsp;</div>';
    } else {
    echo 
    '';

    This I am placing just before my footer starts and this seems to work across the board...it's just on large monitors when there is short content my footer still needs scrolling to see it because of this clear.

    BUT what's short content on a large 22" screen is long content on my macbook pro 15".

    Any ideas on how to do this all dynamically or any help with "footer stick alt"???

    Any help would be much appreciated!!
    Thanks in advance

  2. #2
    Dude... use a faux-footer. Basically make your background your footer and build around that. Works like a champ everytime and is 100% cross browser compatible, and can be done w/o any trickery.
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

  3. #3
    sweet - i always set my mind in a dynamic way!! - so simple thanks simp i'll jump on that tonight and see how i go!

    Will hopefully post back with a success story!

  4. #4
    Hey Simp,

    Just posting back quickly - thanks again for the tip that worked a treat!! so simple to implement and works great 100% of the time.

    Thanks Again!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012