hi
Absolute positioning is relative to a containing block that provides a positioning context; which by default is the document
a) So if absolute positioning is relative to document, then could we imagine the starting point of a document as a two dimensional coordinate system with its origin in the top left corner of a viewport (assuming we scroll browser up to the top and to the far left)?
b) I’m assuming browser considers a far right of a viewport also as a far right of a document?! Thus when the width of viewport is 800px, the document also has a width of 800 pixels, but when we resize viewport to 400 px, then width of a document is also 400 pixels?
In other words, if some element has a width of 3000px, but if viewport only has a width of 400px, then 400px is also the width of document, regardless of element having 3000 pixels in width?
thanx
EDIT:
Sorry for keep dragging this:
1)
You can tell the browser to just ignore anything outside the view port
a) Uhm, it seems that overflow property doesn't have much to do with deciding whether browser should provide scroll bars to view the whole element. Instead, it appears this property deals only with content overflowing element's box?!
b) Thus, I assume that even if overflow is set to hidden, browser will still provide horizontal scroll bar if an element has its width set to 3000 pixels?
c) So is there some other property that decides whether horizontal scroll bar should be provided when we have elements wider than viewport?
2)
I'm not sure how this could occur (see A)
i can't be sure, but an element probably had padding and margin properties set to some large number, and browser didn't provide scroll bars, but instead just removed the margin and padding from the element