Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Dec 2003
    Location
    slovakia
    Posts
    4
    Member #
    4098
    Hi,,

    Is there a way how to keep DIV at the bottom of the page without using JavaScript?

    I used to do this in the past using height=100% in the main table (for example go to http://www.mldgroup.com , look at the bottom ring/women bar)

    thanks

  2.  

  3. #2
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    .footer

    {
    position: absolute;
    bottom: 0px;
    }

    This won't keep the div at the bottom of the visible page (ie. it won't always be visible at the bottom of the window when the page is scrolled) but it'll be at the bottom of the web page.

    If you want the 'bottom of the window even when scrolled' version then you will have to use JavaScript.

  4. #3
    Junior Member
    Join Date
    Dec 2003
    Location
    slovakia
    Posts
    4
    Member #
    4098
    what if this footer will have height of let's say 100px, and the text on the page will exceed the visible window (ie. you'll have to scroll). with the absolute positon set in the sylesheet, it stays there at the bottom of the window.
    For example when I have code like this:

    <body>
    <div class="container">blah blah blah.........lots of text.....blah blah</div>
    <div class="footer">copyright</div>
    </body>

    the text in container will not move footer down, instead if will flow "behind" it.

  5. #4
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    When the page renders the footer goes to the bottom of the page not the bottom of the window. I use this method and I've never had a page flow behind the footer, even with very long dynamically created pages.

    Have you tested this method?

  6. #5
    Junior Member
    Join Date
    Dec 2003
    Location
    slovakia
    Posts
    4
    Member #
    4098
    well,, maybe I misunderstood you.
    Please check this attachment if my code is correct.

    thx.

  7. #6
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Sorry my mistake:

    .footer

    {
    position: relative;
    bottom: 0px;
    }

  8. #7
    Junior Member
    Join Date
    Dec 2003
    Location
    slovakia
    Posts
    4
    Member #
    4098
    thanks a lot mossoi

  9. #8
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    No problem - sorry for the false information to begin with.


Remove Ads

Posting Permissions

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

Search tags for this page

keep div at bottom of page

,

keep div bottom

,

keep div box on the bottom

Click on a term to search for related topics.
All times are GMT -6. The time now is 07:14 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com