Reputation: 73
Is there a way to fix a div using position:fixed
in only top to bottom direction; i.e when I scroll from left to right the div should not be fixed. It should behave as a absolute positioned element. It should be fixed only when I scroll from top to bottom. Is it possible?
Upvotes: 0
Views: 140
Reputation: 1788
If you want pure good solution then, I would recommend you use jQuery. If you will implement it using CSS then it may not be smooth.
Upvotes: 0
Reputation: 1682
It's not possible, because it's not supposed to be.
The action of "scrolling" may be very different from a browser to an other... from a device to an other... So it's not predictable.
Upvotes: 1