[Forwarding Philippe's reply to the list]

On May 10, 2007, at 4:57 PM, Mike Wilson wrote:

> Or are you saying that the height of the containing block used for
> positioning will be different from the calculated size of the actual
> element? This doesn't seem to be the case as the other, absolutely
> pos'd, child DIV finds bottom:0 nicely.

Yes. The height of the parent div (containing block in this case) is  
'auto'.
'height' refers to a declared value.
The computed size is a different matter in this case (actual,  
calculated height).
The other child div behaves differently because it is _absolute_  
positioned. Because for absolute positioned elements height can  
always be resolved.
Percentage values for height and by extension offset ('top') are a  
complicated matter. Basically, only absolute positioned element know  
their 'height' based on the intrinsic values (computed).
10.5 states this quite clearly
<http://www.w3.org/TR/CSS21/visudet.html#the-height-property>

Similarly as with your 'top' offset, your relative positioned element  
won't be able to calculate a height in percentage.

Width is different as it can always be resolved.
(although you might run into problems, depending on how various UA  
will understand the shrinkwrapping of absolute positioned elements.  
Your basic testcase works in current versions of most UA. If it  
becomes more complicated - type of nested elements in your absolute  
positioned div, you'll probably notice differences).

And if you use any other unit of measure (px, em, ex, ...) the  
relative positioned element will move upwards, because that doesn't  
depend on the height of the parent element.



IE Windows is a separate case, there you have the concept of  
'hasLayout' rearing its ugly head.
<http://www.satzansatz.de/cssd/onhavinglayout.html>



> BTW: Just joining the list on Monday it seems my posts are not
> getting through to everybody (can't see my posts in the public
> archive). Is this normal?
That I can't help. Your messages make it to the list.
Maybe you'll need to ask the list admin directly (the email address  
should be listed in the welcoming email you received when you signed up.


Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com>





______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to