On Apr 29, 2009, at 1:12 AM, Alan Gresley wrote: > 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?
In theory, the height of an absolute positioned element is always 'known', and thus the offset can be computed. > 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> In Opera: elements that have an intrinsic width (display:inline-block; img) behave per the current spec (offset, computed based on the height of the containing block). Block level elements (display:block) don't move - that is wrong. In WebKit nightly builds (post r41698): all elements (block/inline- block) move according to the specified offset (but is computed based on the height of the viewport, not the height of the containing block). > Things change (appears normal) if the image is given display-block. > See 5th example. No, that is wrong. The element should move. >> 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). > > 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> Consistent with what happens in the case of height... WebKit nightly: moves the elements (but again, see above). > 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 > > WebKit nightly and Safari 4b (and older) have problems offsetting a floated element (both from left/right and top/bottom). --- BTW - if the element is inline, non-replaced (a <span>) and relative positioned, Opera moves the element. And so does a WebKit nightly build. Philippe --- Philippe Wittenbergh http://l-c-n.com/ ______________________________________________________________________ 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/
