Reputation: 9226
I found how to fix div position using jQuery.
Here is an example.
Can I achieve same effect using css?
UPD: I have seen this solution. I want also horizontal window scrollbar to appear, if fixed element does not fit the window.
Upvotes: 0
Views: 382
Reputation: 18556
You can achieve the same effect without the cool whizz-bangs and animations with position: fixed
. The fixed element will then just scroll along.
As for horizontal scrollbar when content doesn't fit the window, just define width: 100%
and overflow-x: scroll
for the fixed element .
Upvotes: 1