Re: [CSS 2.1] child-> position:absolute, parent -> overflow:scroll

Andrew Fedoniouk wrote:
> Question is: shall 'baz' be scrollable together with the content of
> the 'bar'?

No, the containing block is <foo>.

If you had used top:auto and/or left:auto for <baz> instead
then the answer would be yes, because then the UA should use the
"static position" for the auto value(s).
Note that position:fixed boxes are excluded, they never follow
the scrolling because of the text:
"all scrollable boxes should be assumed to be scrolled to their origin"
in CSS 2.1 10.3.7:
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width


> I'd be happy if someone will point me on the part of the spec that
> explains that special role of overflowed elements in regards of
> positioned children.

There is no such special role, as far as I know.

Note in particular the exception in CSS 2.1 11.1.1:
"It affects the clipping of all of the element's content except any
descendant elements (and their respective content and descendants)
whose containing block is the viewport or an ancestor of the element."
http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow


https://bugzilla.mozilla.org/show_bug.cgi?id=303676
has some testcases and comments you may find useful.

Received on Friday, 23 March 2007 03:47:24 UTC