frebroni
frebroni

Reputation: 31

How to force div to always appear at bottom of page and stay there even after scrolling?

Pretty much all in subject, do i need use javascript to acheive this pr maybe css will fit well? Also I need that solution to work fine with IE6.

If javascript is only solution then how to animate div to change position smoothly?

Thanks in adavnce for any help

Upvotes: 3

Views: 1611

Answers (2)

Ivan
Ivan

Reputation: 11

Like this:

<div style="position: fixed;bottom: 0px;right:0px;">
    This would be on the buttom of the page regardless to scroll.
</div>

Upvotes: 1

AlbertEngelB
AlbertEngelB

Reputation: 16436

You can use calc() inside of CSS to pin it to the bottom of your page.

Check out the CSS Hacks article explaining some of the use cases of calc().

Upvotes: 0

Related Questions