Wednesday, 15 October 2014

Previous Interview Question Next Interview Question
Home

CSS Absolute position vs Fixed position

Absolute Position :

The DOM Element is removed from the normal page flow, and you can set exact vertical and horizontal position of the absolute element relative to the element it is inside.
Additionally, the absolute element's contents will scroll vertically (and/or horizontally) like normal HTML page contents do.

Fixed Position :

The DOM Element is removed from the normal page flow, and you can set exact vertical and horizontal position of the element relative to the browser window.
Additionally, the fixed element's contents will NOT scroll away like normal HTML page contents do, they will stay in their current position in the browser window.
Fixed positioning was not supported by IE until version 7.

Previous Interview Question Next Interview Question
Home

0 comments :

Post a Comment