Reputation: 53607
Similar to some Facebook feature, like the Chat link, that stays constantly at the same place of the page, regardless if you scroll.
Is there a simple pure CSS way to achieve this?
Here is a very simplistic HTML:
<div id='constant-bar'> some background some text</div>
<p>content</p>
<p>content</p>
<p>content</p>
.... X 1000
<p>content</p>
I really care right now for IE>8 and FF > 5 and chrome, Safari latest versions. My code will be released only some time from today
Upvotes: 0
Views: 124
Reputation: 19552
Research position:fixed
It is not supported on many mobile browsers at the moment, and older Internet Explorer versions (IE<7) don't support it either. Additionally, IE 7 has a strange bug.
If you want it to stretch the full height of the page, you'll also have to look into that too. This tutorial might help.
Upvotes: 4