Results 1 to 13 of 13

Thread: [RESOLVED] How do I get a floating <div>?

  1. #1
    PowerPoster
    Join Date
    Jan 04
    Posts
    3,616

    Resolved [RESOLVED] How do I get a floating <div>?

    I have a <div> element that I want to always be at the bottom of the page even if it means having to scroll down to the bottom of the page. I'm not sure how to accomplish this.

    Thanks,
    Blake

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: How do I get a floating <div>?

    I think, what you are looking for is positioning the div as fixed (which would place the div relative to the browser window).

    Check this: http://www.w3schools.com/cssref/pr_class_position.asp


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  3. #3
    PowerPoster
    Join Date
    Jan 04
    Posts
    3,616

    Re: How do I get a floating <div>?

    Unfortunately that's not what I'm looking for. I'm not sure how to explain it I guess. Lets say my page appears and their is no need to scroll. I want this particular <div> to appear at the bottom of the page.

    The other scenario is that I have another <div> that requires scrolling. So, when the user scrolls to the bottom of the page, that's where I want this <div> to appear.

    Thanks,
    Blake

  4. #4
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: How do I get a floating <div>?

    hmm... I am confused

    Can you show an example of what you get and what are you expecting ?

    If you have the page live, then let me know the URL.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  5. #5
    PowerPoster
    Join Date
    Jan 04
    Posts
    3,616

    Re: How do I get a floating <div>?

    This website is still in development mode and does not have it's own URL yet.
    Can't think of another example.

    The easiest way I can think is that this <div> is at the very end of the markup code. Their are other <div> before this in the markup that can be displayed and consequently long enough for it to be scrolled. But if none of these other <div> are displayed, I want this <div> to be displayed at the bottom of the screen. I can't think of any other way to explain it.

    Thanks,
    Blake

  6. #6
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: How do I get a floating <div>?

    Is it like those "social share" bar seen in some of the sites ? It will be there all the time at the bottom of the SCREEN, even if the user scrolls up or down ?


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  7. #7
    PowerPoster
    Join Date
    Jan 04
    Posts
    3,616

    Re: How do I get a floating <div>?

    No...not like those. If you can see the entire content of the page without scrolling...then it should be at the bottom of the screen. If you have to scroll the viewable content...then you shouldn't see it until you scroll to the bottom of the page. Hope that helps!
    Blake

  8. #8
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: How do I get a floating <div>?

    Sorry, but I am lost. Any visual examples would be the best option I think.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  9. #9
    PowerPoster
    Join Date
    Jan 04
    Posts
    3,616

    Re: How do I get a floating <div>?

    I actually figured it out. I set the "position:" to "table" and that took care of it!
    Blake

  10. #10
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: [RESOLVED] How do I get a floating <div>?

    Glad to hear that you resolved it by yourself.

    Is "table" value available for "position" attribute ?
    http://www.w3schools.com/cssref/pr_class_position.asp

    If you don't mind, can you please post the screenshots of "before" and "after". And also the code. Because, that might help me to understand as well as could help me in the future when I meet similar issue.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  11. #11
    PowerPoster
    Join Date
    Jan 04
    Posts
    3,616

    Re: [RESOLVED] How do I get a floating <div>?

    Yes...

    .Sample
    {
    position: table;
    }
    Blake

  12. #12
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,508

    Re: [RESOLVED] How do I get a floating <div>?

    I have no knowledge of position:table;Can you show some examples?
    What i am suspecting is that with using table, that is as far as i know not a position element, you either set position:static (that is the default) or position:inherit, without understanding it.Anyhow i would be glad to see that position:table you mention if it exists since i haven't head it.
    Slow as hell.

  13. #13
    PowerPoster
    Join Date
    Jan 04
    Posts
    3,616

    Re: [RESOLVED] How do I get a floating <div>?

    I don't have any examples other than what I found on my own...which is what I used to fix my problem.
    Blake

Posting Permissions

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