SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    ca
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question floating bottom to browser? is it possible?

    here is an image of what i am talking about... can anyone help? is it possible?

    img180.imageshack.us/my.php?image=61555961at0.jpg

    thanks

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi truckin,

    Yes, this is possible, but it's not a float. You need to set the height of the html and body elements to 100%, then create a DIV that holds everything on the page (save for the footer) and give that a min-height of 100% (IE 6 will need a hack to feed height: 100%; to it since it treats height as min-height while not understanding min-height at all), along with a negative margin equal to the height of the DIV holding the footer to bring it up into place.

    From there it gets rather complicated since there are multiple methods to "force" the footer into position. The easiest by far is to use a "clearing" DIV after the last bit of content inside the "container" DIV.

    You can see an example of this in action at http://www.dan-schulz.com/for-others.../template.html (the directory is unlocked so you can grab the code). I made this for Ethics a while back - I need to see what he's done with it.

    You can do something else as well and use margins/padding to position the footer as well, but it's not for the faint of heart.

    You can see that here at http://www.dan-schulz.com/temp/3columnlayout/ (warning: ADVANCED CSS at work here).

    Our very own Paul O'Brien came up with the 100% document height technique, which he has documented in the "CSS How To" sticky at the top of this board.

  3. #3
    SitePoint Member
    Join Date
    Jul 2004
    Location
    ca
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey dan, i got it but now it went to the left side? i pmed you the url if you have time to check it out?


    thanks






    [QUOTE=Dan Schulz;3772899]Hi truckin,

    Yes, this is possible, but it's not a float. You need to set the height of the html and body elements to 100%, then create a DIV that holds everything on the page (save for the footer) and give that a min-height of 100% (IE 6 will need a hack to feed height: 100%; to it since it treats height as min-height while not understanding min-height at all), along with a negative margin equal to the height of the DIV holding the footer to bring it up into place.

    From there it gets rather complicated since there are multiple methods to "force" the footer into position. The easiest by far is to use a "clearing" DIV after the last bit of content inside the "container" DIV.

    You can see an example of this in action at http://www.dan-schulz.com/for-others.../template.html (the directory is unlocked so you can grab the code). I made this for Ethics a while back - I need to see what he's done with it.

    You can do something else as well and use margins/padding to position the footer as well, but it's not for the faint of heart.

    You can see that here at http://www.dan-schulz.com/temp/3columnlayout/ (warning: ADVANCED CSS at work here).

    Our very own Paul O'Brien came up with the 100% document height technique, which he has documented in the "CSS How To" sticky at the top of this board.[/QUOTE

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Considering how you PM'd me...


Bookmarks

Posting Permissions

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