|
-
Jul 6th, 2012, 11:07 PM
#1
Thread Starter
PowerPoster
[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,
-
Jul 6th, 2012, 11:32 PM
#2
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 FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jul 7th, 2012, 12:12 AM
#3
Thread Starter
PowerPoster
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,
-
Jul 7th, 2012, 12:16 AM
#4
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 FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jul 7th, 2012, 12:28 AM
#5
Thread Starter
PowerPoster
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,
-
Jul 7th, 2012, 12:46 AM
#6
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 FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jul 7th, 2012, 12:09 PM
#7
Thread Starter
PowerPoster
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!
-
Jul 7th, 2012, 02:07 PM
#8
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 FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jul 7th, 2012, 05:58 PM
#9
Thread Starter
PowerPoster
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!
-
Jul 8th, 2012, 01:24 AM
#10
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 FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jul 8th, 2012, 04:44 PM
#11
Thread Starter
PowerPoster
Re: [RESOLVED] How do I get a floating <div>?
Yes...
.Sample
{
position: table;
}
-
Jul 9th, 2012, 09:13 PM
#12
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 10th, 2012, 03:06 PM
#13
Thread Starter
PowerPoster
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|