Reputation: 11438
Just found the link with a visible
element with position:fixed
behaves kinda strange:
The element is div
with id
equals to centerMessages
. It appears to be green, visible and ... moving. How come that a fixed element is moving as the page is scrolled? Or, in other words, which part of the spec I need to re-read/re-learn please?
Upvotes: 0
Views: 1081
Reputation: 75598
The div does not move when you scroll. It contains no content, so you can't see it.
Upvotes: 2
Reputation: 1311
Fixed position just means that the element doesn't move relative to the scroll position of the page; it can still be given a position relative to the browser window. You can change this position using CSS and Javascript.
Upvotes: 1