I am really confused with this. Here I’ve got a div whose position should be fixed after certain scroll. Before position of that div is absolute. I tried it and found that for one of my screens fixing position is really making document less while on other screen it is not.
What I want to know is which of them is a bug? Does fixing position of element decreases document height?
Thanks
If you use a fixed positioning for an element, it is removed from the “normal layout flow”. The height of your document is determined by positioning of all the elements in the page and thus, all changes to positioning affect document height.
Fixed and absolute positioning are explained in detail in the CSS Visual formatting model spec: http://www.w3.org/TR/CSS2/visuren.html#absolute-positioning
Regarding absolute positioning (from the spec):
Pretty much the same applies for fixed positioning (Ibid.):