W3C home > Mailing lists > Public > www-style@w3.org > March 2007

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

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 22 Mar 2007 11:42:01 -0800
Message-ID: <002b01c76cba$29d8f630$db02000a@internal.toppro.net>
To: <www-style@w3.org>

Consider following markup

      </baz >
  </bar >

and styles for this case:

foo { position: absolute; }
bar { overflow: scroll; }
baz { position: absolute; top: 1px; left: 1px; }

Question is: shall 'baz' be scrollable together with the content of
the 'bar'? In other words: what element is a 'containing block' for the 

Following to the rule:

"The containing block for a positioned box is established by the nearest 
*positioned* ancestor" [1] 

'baz' shall have position calculated in respect of the 'foo' so 
scroll position of 'bar' shall not affect its position.
But this is not what happen in most of UAs I have access to.

It appears that block with overflow: scroll; establishes 
separate positioning context for absolute positioned elements.

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.  

Andrew Fedoniouk.

[1] http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning
Received on Thursday, 22 March 2007 18:40:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:28 UTC