Philippe Wittenbergh wrote:
[...]
> Hmm lots of (interesting) variations on this one !
> 
> IE 8 and Gecko (fx 3 and newer), Safari 4b render the same.
> Opera 10 is different.
> WebKit latest nightly is again different.
> 
> And of course, IE 7 is again different from everybody else.
> 
> The main issue in this test is: can / should a (negative) percentage  
> offset from top (top : -50%) compute to something other than '0' when  
> the immediate parent has _no_ specified height - and is not absolute  
> positioned ?
> 
> The consensus in the CSS working group is that it should be possible  
> to calculate such and offset
> http://lists.w3.org/Archives/Public/www-style/2007Aug/0139.html
> http://www.w3.org/TR/2007/CR-CSS21-20070719/changes.html#q53
> http://www.w3.org/TR/CSS21/visuren.html#position-props
> 
> This latest change has been incorporated in WebKit nightlies (but not  
> Safari 4beta).  But it apparently mangles something else, as most of  
> the red squares don't appear…
> Gecko has an open bug on this issue:
> https://bugzilla.mozilla.org/show_bug.cgi?id=260348


It those request for the impossible that possible causes the mangling. 
Even though the spec has changed, the question is, can a top offset for 
a child element in a parent of auto height be implemented successfully? 
I can't test in WebKit nightlies but no other browser handles it. Opera 
is showing a strange handling of divs with inline-block (3rd example) 
and images (4rd example).


<http://css-class.com/test/temp/per-offset-in-auto-height-box.htm>


Things change (appears normal) if the image is given display-block. See 
5th example.


> The next question is: should this equally apply to a set up where the  
> immediate parent has min-height instead of height applied… (I think  
> the answer should be yes, as seen in Opera).
> 
> Philippe
> ---
> Philippe Wittenbergh
> http://l-c-n.com/


It seem min-height is ignored in all browsers apart from Opera.

<http://css-class.com/test/temp/per-offset-in-auto-min-height-box.htm>


BTW, Playing around with these test unearth a bug in Safari if the child 
element with offset is floated. OK with pixels but not percentages.

<http://css-class.com/test/bugs/safari/per-offset-in-auto-min-height-box.htm>


Again Opera shows different with min-height (4th example), much like the 
other test.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to