How can I set position of a <div>
to the bottom of page with either CSS or jQuery?
相关问题
- Views base64 encoded blob in HTML with PHP
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
The combination
position:fixed;
withbottom:0;
works for me.This has been answered already, but to give a little bit more context for non CSS-experts:
Given the HTML
then the following css
will position the text at the lower right corner of your viewport (browser window). Scrolling will move the footer text.
If you use
on the other hand, the footer will stay at the bottom of your viewport, even if you scroll. The same technique can be used with
top: 0
andleft: 0
btw, to position an element at the top left corner.You can use
position:absolute;bottom:0;
if that's all you want.I think you can do this:
Use
position:absolute
andbottom:0
Check working example. http://jsfiddle.net/gyExR/
in css: position:absolute or position:fixed